mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-28 13:47:23 +00:00
[Glitch] Add hotkey Q for quoting the currently focused post
Port 229cbc6a24 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
@@ -63,6 +63,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 '@/flavours/glitch/actions/compose_typed';
|
||||
|
||||
const messages = defineMessages({
|
||||
revealAll: { id: 'status.show_more_all', defaultMessage: 'Show more for all' },
|
||||
@@ -429,6 +430,10 @@ class Status extends ImmutablePureComponent {
|
||||
this.handleBookmarkClick(this.props.status);
|
||||
};
|
||||
|
||||
handleHotkeyQuote = () => {
|
||||
this.props.dispatch(quoteComposeById(this.props.status.get('id')));
|
||||
};
|
||||
|
||||
handleHotkeyMention = e => {
|
||||
e.preventDefault();
|
||||
this.handleMentionClick(this.props.status);
|
||||
@@ -573,6 +578,7 @@ class Status extends ImmutablePureComponent {
|
||||
reply: this.handleHotkeyReply,
|
||||
favourite: this.handleHotkeyFavourite,
|
||||
boost: this.handleHotkeyBoost,
|
||||
quote: this.handleHotkeyQuote,
|
||||
bookmark: this.handleHotkeyBookmark,
|
||||
mention: this.handleHotkeyMention,
|
||||
openProfile: this.handleHotkeyOpenProfile,
|
||||
|
||||
Reference in New Issue
Block a user