Fixes cmd+shift+r keyboard shortcut
This commit is contained in:
parent
d0494e5450
commit
fe2007195b
2 changed files with 10 additions and 0 deletions
|
@ -63,6 +63,7 @@ import { isImageTypeSupported } from '../util/GoogleChrome';
|
||||||
import * as KeyboardLayout from '../services/keyboardLayout';
|
import * as KeyboardLayout from '../services/keyboardLayout';
|
||||||
import { usePrevious } from '../hooks/usePrevious';
|
import { usePrevious } from '../hooks/usePrevious';
|
||||||
import { PanelType } from '../types/Panels';
|
import { PanelType } from '../types/Panels';
|
||||||
|
import { useEscapeHandling } from '../hooks/useEscapeHandling';
|
||||||
|
|
||||||
export type OwnProps = Readonly<{
|
export type OwnProps = Readonly<{
|
||||||
acceptedMessageRequest?: boolean;
|
acceptedMessageRequest?: boolean;
|
||||||
|
@ -517,6 +518,14 @@ export function CompositionArea({
|
||||||
};
|
};
|
||||||
}, [setLarge]);
|
}, [setLarge]);
|
||||||
|
|
||||||
|
const clearQuote = useCallback(() => {
|
||||||
|
if (quotedMessageId) {
|
||||||
|
setQuoteByMessageId(conversationId, undefined);
|
||||||
|
}
|
||||||
|
}, [conversationId, quotedMessageId, setQuoteByMessageId]);
|
||||||
|
|
||||||
|
useEscapeHandling(clearQuote);
|
||||||
|
|
||||||
if (isSignalConversation) {
|
if (isSignalConversation) {
|
||||||
// TODO DESKTOP-4547
|
// TODO DESKTOP-4547
|
||||||
return <div />;
|
return <div />;
|
||||||
|
|
|
@ -217,6 +217,7 @@ export class TimelineItem extends React.PureComponent<PropsType> {
|
||||||
{...reducedProps}
|
{...reducedProps}
|
||||||
{...item.data}
|
{...item.data}
|
||||||
isSelected={isSelected}
|
isSelected={isSelected}
|
||||||
|
selectMessage={selectMessage}
|
||||||
shouldCollapseAbove={shouldCollapseAbove}
|
shouldCollapseAbove={shouldCollapseAbove}
|
||||||
shouldCollapseBelow={shouldCollapseBelow}
|
shouldCollapseBelow={shouldCollapseBelow}
|
||||||
shouldHideMetadata={shouldHideMetadata}
|
shouldHideMetadata={shouldHideMetadata}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue