Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Pierre Boudes
mastodon
Commits
c875f196
Commit
c875f196
authored
6 years ago
by
ThibG
Committed by
Eugen Rochko
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix race condition causing shallow status with only a "favourited" attribute (#9272)
Fixes #9231
parent
bb69d154
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/javascript/mastodon/reducers/statuses.js
+2
-2
2 additions, 2 deletions
app/javascript/mastodon/reducers/statuses.js
with
2 additions
and
2 deletions
app/javascript/mastodon/reducers/statuses.js
+
2
−
2
View file @
c875f196
...
...
@@ -38,11 +38,11 @@ export default function statuses(state = initialState, action) {
case
FAVOURITE_REQUEST
:
return
state
.
setIn
([
action
.
status
.
get
(
'
id
'
),
'
favourited
'
],
true
);
case
FAVOURITE_FAIL
:
return
state
.
setIn
([
action
.
status
.
get
(
'
id
'
),
'
favourited
'
],
false
);
return
state
.
get
(
action
.
status
.
get
(
'
id
'
))
===
undefined
?
state
:
state
.
setIn
([
action
.
status
.
get
(
'
id
'
),
'
favourited
'
],
false
);
case
REBLOG_REQUEST
:
return
state
.
setIn
([
action
.
status
.
get
(
'
id
'
),
'
reblogged
'
],
true
);
case
REBLOG_FAIL
:
return
state
.
setIn
([
action
.
status
.
get
(
'
id
'
),
'
reblogged
'
],
false
);
return
state
.
get
(
action
.
status
.
get
(
'
id
'
))
===
undefined
?
state
:
state
.
setIn
([
action
.
status
.
get
(
'
id
'
),
'
reblogged
'
],
false
);
case
STATUS_MUTE_SUCCESS
:
return
state
.
setIn
([
action
.
id
,
'
muted
'
],
true
);
case
STATUS_UNMUTE_SUCCESS
:
...
...
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