diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-02-11 00:53:12 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2021-02-12 12:31:49 +0100 |
commit | 49eef466b8274ca5768deca3309af31bfbf81184 (patch) | |
tree | 2689e394f9f88d05533e70ad0f6bcf622ee2fd5c /app/javascript/flavours/glitch/containers | |
parent | 9213b026565ff7da4c363b015c3aa46921ecdcc6 (diff) |
[Glitch] Add dropdown for boost privacy in boost confirmation modal
Port 07b46cb332ae197584e3ed3f23fe814b7793ec4c to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/containers')
-rw-r--r-- | app/javascript/flavours/glitch/containers/dropdown_menu_container.js | 1 | ||||
-rw-r--r-- | app/javascript/flavours/glitch/containers/status_container.js | 9 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js index e60ee814d..1c0385b74 100644 --- a/app/javascript/flavours/glitch/containers/dropdown_menu_container.js +++ b/app/javascript/flavours/glitch/containers/dropdown_menu_container.js @@ -5,7 +5,6 @@ import DropdownMenu from 'flavours/glitch/components/dropdown_menu'; import { isUserTouching } from 'flavours/glitch/util/is_mobile'; const mapStateToProps = state => ({ - isModalOpen: state.get('modal').modalType === 'ACTIONS', dropdownPlacement: state.getIn(['dropdown_menu', 'placement']), openDropdownId: state.getIn(['dropdown_menu', 'openId']), openedViaKeyboard: state.getIn(['dropdown_menu', 'keyboard']), diff --git a/app/javascript/flavours/glitch/containers/status_container.js b/app/javascript/flavours/glitch/containers/status_container.js index 7782246a6..6461bf805 100644 --- a/app/javascript/flavours/glitch/containers/status_container.js +++ b/app/javascript/flavours/glitch/containers/status_container.js @@ -21,6 +21,7 @@ import { muteStatus, unmuteStatus, deleteStatus } from 'flavours/glitch/actions/ import { initMuteModal } from 'flavours/glitch/actions/mutes'; import { initBlockModal } from 'flavours/glitch/actions/blocks'; import { initReport } from 'flavours/glitch/actions/reports'; +import { initBoostModal } from 'flavours/glitch/actions/boosts'; import { openModal } from 'flavours/glitch/actions/modal'; import { deployPictureInPicture } from 'flavours/glitch/actions/picture_in_picture'; import { changeLocalSetting } from 'flavours/glitch/actions/local_settings'; @@ -96,11 +97,11 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({ }); }, - onModalReblog (status) { + onModalReblog (status, privacy) { if (status.get('reblogged')) { dispatch(unreblog(status)); } else { - dispatch(reblog(status)); + dispatch(reblog(status, privacy)); } }, @@ -108,11 +109,11 @@ const mapDispatchToProps = (dispatch, { intl, contextType }) => ({ dispatch((_, getState) => { let state = getState(); if (state.getIn(['local_settings', 'confirm_boost_missing_media_description']) && status.get('media_attachments').some(item => !item.get('description')) && !status.get('reblogged')) { - dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog, missingMediaDescription: true })); + dispatch(initBoostModal({ status, onReblog: this.onModalReblog, missingMediaDescription: true })); } else if (e.shiftKey || !boostModal) { this.onModalReblog(status); } else { - dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog })); + dispatch(initBoostModal({ status, onReblog: this.onModalReblog })); } }); }, |