From 8a2cf9d6177f5107ae12302fb9aa01de9f2fe39c Mon Sep 17 00:00:00 2001 From: KMY Date: Thu, 24 Aug 2023 10:44:07 +0900 Subject: [PATCH] Fix stay_privasy is over working in edit post --- app/javascript/mastodon/reducers/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index f06696f160..59be1ae6da 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -125,14 +125,13 @@ function statusToTextMentions(state, status) { function clearAll(state) { return state.withMutations(map => { - map.set('id', null); map.set('text', ''); map.set('spoiler', false); map.set('spoiler_text', ''); map.set('markdown', false); map.set('is_submitting', false); map.set('is_changing_upload', false); - if (!state.get('stay_privacy') || state.get('in_reply_to') || !state.get('posted_on_this_session')) { + if (!state.get('stay_privacy') || state.get('in_reply_to') || !state.get('posted_on_this_session') || state.get('id')) { map.set('privacy', state.get('default_privacy')); map.set('circle_id', null); } @@ -142,6 +141,7 @@ function clearAll(state) { if (!state.get('in_reply_to')) { map.set('posted_on_this_session', true); } + map.set('id', null); map.set('in_reply_to', null); map.set('searchability', state.get('default_searchability')); map.set('sensitive', state.get('default_sensitive'));