[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

@@ -1,3 +1,5 @@
import { browserHistory } from 'flavours/glitch/components/router';
import api, { getLinks } from '../api';
import {
@@ -722,6 +724,16 @@ export const updateAccount = ({ displayName, note, avatar, header, discoverable,
});
};
export const navigateToProfile = (accountId) => {
return (_dispatch, getState) => {
const acct = getState().accounts.getIn([accountId, 'acct']);
if (acct) {
browserHistory.push(`/@${acct}`);
}
};
};
export function fetchPinnedAccountsSuggestions(q) {
return (dispatch) => {
dispatch(fetchPinnedAccountsSuggestionsRequest());