Add hotkey Q for quoting the currently focused post (#35941)
This commit is contained in:
parent
dccd29fe25
commit
229cbc6a24
7 changed files with 36 additions and 1 deletions
|
|
@ -69,6 +69,7 @@ import { attachFullscreenListener, detachFullscreenListener, isFullscreen } from
|
|||
import ActionBar from './components/action_bar';
|
||||
import { DetailedStatus } from './components/detailed_status';
|
||||
import { RefreshController } from './components/refresh_controller';
|
||||
import { quoteComposeById } from '@/mastodon/actions/compose_typed';
|
||||
|
||||
const messages = defineMessages({
|
||||
revealAll: { id: 'status.show_more_all', defaultMessage: 'Show more for all' },
|
||||
|
|
@ -409,6 +410,10 @@ class Status extends ImmutablePureComponent {
|
|||
this.handleReblogClick(this.props.status);
|
||||
};
|
||||
|
||||
handleHotkeyQuote = () => {
|
||||
this.props.dispatch(quoteComposeById(this.props.status.get('id')));
|
||||
};
|
||||
|
||||
handleHotkeyMention = e => {
|
||||
e.preventDefault();
|
||||
this.handleMentionClick(this.props.status.get('account'));
|
||||
|
|
@ -546,6 +551,7 @@ class Status extends ImmutablePureComponent {
|
|||
reply: this.handleHotkeyReply,
|
||||
favourite: this.handleHotkeyFavourite,
|
||||
boost: this.handleHotkeyBoost,
|
||||
quote: this.handleHotkeyQuote,
|
||||
mention: this.handleHotkeyMention,
|
||||
openProfile: this.handleHotkeyOpenProfile,
|
||||
toggleHidden: this.handleHotkeyToggleHidden,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue