[Glitch] Add dropdown for boost privacy in boost confirmation modal

Port 07b46cb332 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire
2021-02-11 00:53:12 +01:00
parent 9213b02656
commit 49eef466b8
14 changed files with 134 additions and 25 deletions

View File

@@ -11,6 +11,7 @@ import { replyCompose } from 'flavours/glitch/actions/compose';
import { reblog, favourite, unreblog, unfavourite } from 'flavours/glitch/actions/interactions';
import { makeGetStatus } from 'flavours/glitch/selectors';
import { openModal } from 'flavours/glitch/actions/modal';
import { initBoostModal } from 'flavours/glitch/actions/boosts';
const messages = defineMessages({
reply: { id: 'status.reply', defaultMessage: 'Reply' },
@@ -82,9 +83,9 @@ class Footer extends ImmutablePureComponent {
}
};
_performReblog = () => {
_performReblog = (privacy) => {
const { dispatch, status } = this.props;
dispatch(reblog(status));
dispatch(reblog(status, privacy));
}
handleReblogClick = e => {
@@ -95,7 +96,7 @@ class Footer extends ImmutablePureComponent {
} else if ((e && e.shiftKey) || !boostModal) {
this._performReblog();
} else {
dispatch(openModal('BOOST', { status, onReblog: this._performReblog }));
dispatch(initBoostModal({ status, onReblog: this._performReblog }));
}
};