From 180f1383943ad171d8394ef9af7c7861bfc08056 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 7 Jan 2020 18:11:50 +0100 Subject: Make prepending “re: ” to CWs on reply optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/flavours/glitch/reducers/compose.js | 2 +- app/javascript/flavours/glitch/reducers/local_settings.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/reducers') diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 0f807790b..92a9859d9 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -387,7 +387,7 @@ export default function compose(state = initialState, action) { if (action.status.get('spoiler_text').length > 0) { let spoiler_text = action.status.get('spoiler_text'); - if (!spoiler_text.match(/^re[: ]/i)) { + if (action.prependCWRe && !spoiler_text.match(/^re[: ]/i)) { spoiler_text = 're: '.concat(spoiler_text); } map.set('spoiler', true); diff --git a/app/javascript/flavours/glitch/reducers/local_settings.js b/app/javascript/flavours/glitch/reducers/local_settings.js index ad94ea243..3d94d665c 100644 --- a/app/javascript/flavours/glitch/reducers/local_settings.js +++ b/app/javascript/flavours/glitch/reducers/local_settings.js @@ -17,6 +17,7 @@ const initialState = ImmutableMap({ confirm_missing_media_description: false, confirm_boost_missing_media_description: false, confirm_before_clearing_draft: true, + prepend_cw_re: true, preselect_on_reply: true, inline_preview_cards: true, hicolor_privacy_icons: false, -- cgit