pl-fe: cleanup
Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
parent
615f2cb0cc
commit
7a85ef413b
2 changed files with 19 additions and 24 deletions
|
@ -29,20 +29,17 @@ const ScheduledStatusActionBar: React.FC<IScheduledStatusActionBar> = ({ status
|
||||||
const { settings } = useSettingsStore();
|
const { settings } = useSettingsStore();
|
||||||
|
|
||||||
const handleCancelClick = () => {
|
const handleCancelClick = () => {
|
||||||
dispatch((_, getState) => {
|
const deleteModal = settings.deleteModal;
|
||||||
|
if (!deleteModal) {
|
||||||
const deleteModal = settings.deleteModal;
|
dispatch(cancelScheduledStatus(status.id));
|
||||||
if (!deleteModal) {
|
} else {
|
||||||
dispatch(cancelScheduledStatus(status.id));
|
openModal('CONFIRM', {
|
||||||
} else {
|
heading: intl.formatMessage(messages.deleteHeading),
|
||||||
openModal('CONFIRM', {
|
message: intl.formatMessage(messages.deleteMessage),
|
||||||
heading: intl.formatMessage(messages.deleteHeading),
|
confirm: intl.formatMessage(messages.deleteConfirm),
|
||||||
message: intl.formatMessage(messages.deleteMessage),
|
onConfirm: () => dispatch(cancelScheduledStatus(status.id)),
|
||||||
confirm: intl.formatMessage(messages.deleteConfirm),
|
});
|
||||||
onConfirm: () => dispatch(cancelScheduledStatus(status.id)),
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -143,18 +143,16 @@ const Thread: React.FC<IThread> = ({
|
||||||
const handleModalReblog = (status: Pick<SelectedStatus, 'id'>) => dispatch(reblog(status));
|
const handleModalReblog = (status: Pick<SelectedStatus, 'id'>) => dispatch(reblog(status));
|
||||||
|
|
||||||
const handleReblogClick = (status: SelectedStatus, e?: React.MouseEvent) => {
|
const handleReblogClick = (status: SelectedStatus, e?: React.MouseEvent) => {
|
||||||
dispatch((_, getState) => {
|
const boostModal = settings.boostModal;
|
||||||
const boostModal = settings.boostModal;
|
if (status.reblogged) {
|
||||||
if (status.reblogged) {
|
dispatch(unreblog(status));
|
||||||
dispatch(unreblog(status));
|
} else {
|
||||||
|
if ((e && e.shiftKey) || !boostModal) {
|
||||||
|
handleModalReblog(status);
|
||||||
} else {
|
} else {
|
||||||
if ((e && e.shiftKey) || !boostModal) {
|
openModal('BOOST', { statusId: status.id, onReblog: handleModalReblog });
|
||||||
handleModalReblog(status);
|
|
||||||
} else {
|
|
||||||
openModal('BOOST', { statusId: status.id, onReblog: handleModalReblog });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMentionClick = (account: Pick<Account, 'acct'>) => dispatch(mentionCompose(account));
|
const handleMentionClick = (account: Pick<Account, 'acct'>) => dispatch(mentionCompose(account));
|
||||||
|
|
Loading…
Reference in a new issue