Fix keyboard shortcuts and navigation in grouped notifications (#31076)

This commit is contained in:
Claire 2024-07-23 08:20:17 +02:00 committed by GitHub
commit af06d74574
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 188 additions and 66 deletions

View file

@ -1,3 +1,5 @@
import { browserHistory } from 'mastodon/components/router';
import api, { getLinks } from '../api';
import {
@ -676,3 +678,13 @@ export const updateAccount = ({ displayName, note, avatar, header, discoverable,
dispatch(importFetchedAccount(response.data));
});
};
export const navigateToProfile = (accountId) => {
return (_dispatch, getState) => {
const acct = getState().accounts.getIn([accountId, 'acct']);
if (acct) {
browserHistory.push(`/@${acct}`);
}
};
};