Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pleroma-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
pleroma-fe
Commits
ba2e05bc
Commit
ba2e05bc
authored
6 years ago
by
Dave LiPuma
Browse files
Options
Downloads
Patches
Plain Diff
#392
: stale data served to new user account
parent
24f3770f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
4 merge requests
!673
Update master with bugfixes (and other changes)
,
!660
[i18n] Update: occitan language
,
!648
WIP: Merge develop into mastoapi-exploration
,
!625
#392: stale data served to new user account
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/notifications/notifications.js
+2
-1
2 additions, 1 deletion
src/components/notifications/notifications.js
src/modules/statuses.js
+12
-3
12 additions, 3 deletions
src/modules/statuses.js
src/modules/users.js
+4
-0
4 additions, 0 deletions
src/modules/users.js
with
18 additions
and
4 deletions
src/components/notifications/notifications.js
+
2
−
1
View file @
ba2e05bc
...
...
@@ -11,7 +11,8 @@ const Notifications = {
const
store
=
this
.
$store
const
credentials
=
store
.
state
.
users
.
currentUser
.
credentials
notificationsFetcher
.
startFetching
({
store
,
credentials
})
const
fetcherId
=
notificationsFetcher
.
startFetching
({
store
,
credentials
})
this
.
$store
.
commit
(
'
setNotificationFetcher
'
,
{
fetcherId
})
},
data
()
{
return
{
...
...
This diff is collapsed.
Click to expand it.
src/modules/statuses.js
+
12
−
3
View file @
ba2e05bc
import
{
remove
,
slice
,
each
,
find
,
maxBy
,
minBy
,
merge
,
last
,
isArray
}
from
'
lodash
'
import
{
remove
,
slice
,
each
,
find
,
maxBy
,
minBy
,
merge
,
last
,
isArray
,
cloneDeep
}
from
'
lodash
'
import
apiService
from
'
../services/api/api.service.js
'
// import parse from '../services/status_parser/status_parser.js'
...
...
@@ -29,7 +29,8 @@ export const defaultState = {
data
:
[],
idStore
:
{},
loading
:
false
,
error
:
false
error
:
false
,
fetcherId
:
null
},
favorites
:
new
Set
(),
error
:
false
,
...
...
@@ -321,6 +322,14 @@ export const mutations = {
oldTimeline
.
visibleStatusesObject
=
{}
each
(
oldTimeline
.
visibleStatuses
,
(
status
)
=>
{
oldTimeline
.
visibleStatusesObject
[
status
.
id
]
=
status
})
},
setNotificationFetcher
(
state
,
{
fetcherId
})
{
state
.
notifications
.
fetcherId
=
fetcherId
},
resetStatuses
(
state
)
{
Object
.
keys
(
state
).
forEach
(
key
=>
{
state
[
key
]
=
cloneDeep
(
defaultState
[
key
])
})
},
clearTimeline
(
state
,
{
timeline
})
{
state
.
timelines
[
timeline
]
=
emptyTl
(
state
.
timelines
[
timeline
].
userId
)
},
...
...
@@ -371,7 +380,7 @@ export const mutations = {
}
const
statuses
=
{
state
:
defaultState
,
state
:
cloneDeep
(
defaultState
)
,
actions
:
{
addNewStatuses
({
rootState
,
commit
},
{
statuses
,
showImmediately
=
false
,
timeline
=
false
,
noIdUpdate
=
false
,
userId
})
{
commit
(
'
addNewStatuses
'
,
{
statuses
,
showImmediately
,
timeline
,
noIdUpdate
,
user
:
rootState
.
users
.
currentUser
,
userId
})
...
...
This diff is collapsed.
Click to expand it.
src/modules/users.js
+
4
−
0
View file @
ba2e05bc
...
...
@@ -290,6 +290,10 @@ const users = {
store
.
commit
(
'
setToken
'
,
false
)
store
.
dispatch
(
'
stopFetching
'
,
'
friends
'
)
store
.
commit
(
'
setBackendInteractor
'
,
backendInteractorService
())
if
(
store
.
rootState
.
statuses
.
notifications
.
fetcherId
)
{
window
.
clearInterval
(
store
.
rootState
.
statuses
.
notifications
.
fetcherId
)
}
store
.
commit
(
'
resetStatuses
'
)
},
loginUser
(
store
,
accessToken
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment