[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:
diondiondion
2025-08-28 14:33:23 +02:00
committed by Claire
parent c1159fa712
commit 5db1bbef69
6 changed files with 33 additions and 1 deletions

View File

@@ -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,