Skip to content

Commit

Permalink
Add hotkey for follow requests (#8307)
Browse files Browse the repository at this point in the history
  • Loading branch information
abackstrom authored and Gargron committed Aug 20, 2018
1 parent 1d1e017 commit 25f6f41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/javascript/mastodon/features/ui/index.js
Expand Up @@ -89,6 +89,7 @@ const keyMap = {
goToProfile: 'g u',
goToBlocked: 'g b',
goToMuted: 'g m',
goToRequests: 'g r',
toggleHidden: 'x',
};

Expand Down Expand Up @@ -427,6 +428,10 @@ export default class UI extends React.PureComponent {
this.context.router.history.push('/mutes');
}

handleHotkeyGoToRequests = () => {
this.context.router.history.push('/follow_requests');
}

render () {
const { draggingOver } = this.state;
const { children, isComposing, location, dropdownMenuIsOpen } = this.props;
Expand All @@ -449,6 +454,7 @@ export default class UI extends React.PureComponent {
goToProfile: this.handleHotkeyGoToProfile,
goToBlocked: this.handleHotkeyGoToBlocked,
goToMuted: this.handleHotkeyGoToMuted,
goToRequests: this.handleHotkeyGoToRequests,
};

return (
Expand Down

0 comments on commit 25f6f41

Please sign in to comment.