Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
a3ef0761
Commit
a3ef0761
authored
6 years ago
by
ThibG
Committed by
Eugen Rochko
6 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Fix race condition causing shallow status with only a "favourited" attribute (#9272)
Fixes #9231
parent
cd8575ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/javascript/mastodon/reducers/statuses.js
+2
-2
app/javascript/mastodon/reducers/statuses.js
with
2 additions
and
2 deletions
+2
-2
app/javascript/mastodon/reducers/statuses.js
+
2
-
2
View file @
a3ef0761
...
...
@@ -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.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment