[Glitch] Fix keyboard shortcuts and navigation in grouped notifications

Port af06d74574 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire
2024-07-23 08:20:17 +02:00
parent 68000956f4
commit 838ea5f9cd
7 changed files with 191 additions and 66 deletions

View File

@@ -131,6 +131,18 @@ export function replyCompose(status) {
};
}
export function replyComposeById(statusId) {
return (dispatch, getState) => {
const state = getState();
const status = state.statuses.get(statusId);
if (status) {
const account = state.accounts.get(status.get('account'));
dispatch(replyCompose(status.set('account', account)));
}
};
}
export function cancelReplyCompose() {
return {
type: COMPOSE_REPLY_CANCEL,
@@ -163,6 +175,12 @@ export function mentionCompose(account) {
};
}
export function mentionComposeById(accountId) {
return (dispatch, getState) => {
dispatch(mentionCompose(getState().accounts.get(accountId)));
};
}
export function directCompose(account) {
return (dispatch, getState) => {
dispatch({