mirror of
https://github.com/mastodon/mastodon.git
synced 2025-11-29 19:03:41 +00:00
Fix quoting overwriting current content warning
This commit is contained in:
parent
9872197d1f
commit
e4dacf3781
|
|
@ -341,8 +341,8 @@ export const composeReducer = (state = initialState, action) => {
|
||||||
const isDirect = state.get('privacy') === 'direct';
|
const isDirect = state.get('privacy') === 'direct';
|
||||||
return state
|
return state
|
||||||
.set('quoted_status_id', isDirect ? null : status.get('id'))
|
.set('quoted_status_id', isDirect ? null : status.get('id'))
|
||||||
.set('spoiler', status.get('sensitive'))
|
.update('spoiler', spoiler => (spoiler) || !!status.get('spoiler_text'))
|
||||||
.set('spoiler_text', status.get('spoiler_text'))
|
.update('spoiler_text', (spoiler_text) => spoiler_text || status.get('spoiler_text'))
|
||||||
.update('privacy', (visibility) => {
|
.update('privacy', (visibility) => {
|
||||||
if (['public', 'unlisted'].includes(visibility) && status.get('visibility') === 'private') {
|
if (['public', 'unlisted'].includes(visibility) && status.get('visibility') === 'private') {
|
||||||
return 'private';
|
return 'private';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user