Fixes cmd+shift+r keyboard shortcut

This commit is contained in:
Josh Perez 2023-01-19 17:59:58 -05:00 committed by GitHub
parent d0494e5450
commit fe2007195b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View file

@ -63,6 +63,7 @@ import { isImageTypeSupported } from '../util/GoogleChrome';
import * as KeyboardLayout from '../services/keyboardLayout';
import { usePrevious } from '../hooks/usePrevious';
import { PanelType } from '../types/Panels';
import { useEscapeHandling } from '../hooks/useEscapeHandling';
export type OwnProps = Readonly<{
acceptedMessageRequest?: boolean;
@ -517,6 +518,14 @@ export function CompositionArea({
};
}, [setLarge]);
const clearQuote = useCallback(() => {
if (quotedMessageId) {
setQuoteByMessageId(conversationId, undefined);
}
}, [conversationId, quotedMessageId, setQuoteByMessageId]);
useEscapeHandling(clearQuote);
if (isSignalConversation) {
// TODO DESKTOP-4547
return <div />;