1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Fix sensitive flag not being removed when removing CW in new compose form (#29248)

This commit is contained in:
Hinaloe 2024-02-19 22:31:16 +09:00 committed by GitHub
parent ad16362efe
commit c645490d55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -315,8 +315,8 @@ export default function compose(state = initialState, action) {
map.set('spoiler', !state.get('spoiler'));
map.set('idempotencyKey', uuid());
if (!state.get('sensitive') && state.get('media_attachments').size >= 1) {
map.set('sensitive', true);
if (state.get('media_attachments').size >= 1 && !state.get('default_sensitive')) {
map.set('sensitive', !state.get('spoiler'));
}
});
case COMPOSE_SPOILER_TEXT_CHANGE: