Support ⌘+0 hotkey for opening Saved Messages (#1947)

This commit is contained in:
Alexander Zinchuk 2022-07-09 02:32:34 +02:00
parent 56110bba0e
commit cbea850d92

View File

@ -318,7 +318,7 @@ const LeftColumn: FC<StateProps> = ({
const handleHotkeySavedMessages = useCallback((e: KeyboardEvent) => {
e.preventDefault();
openChat({ id: currentUserId });
openChat({ id: currentUserId, shouldReplaceHistory: true });
}, [currentUserId, openChat]);
const handleHotkeySettings = useCallback((e: KeyboardEvent) => {
@ -329,6 +329,7 @@ const LeftColumn: FC<StateProps> = ({
useHotkeys({
'Mod+Shift+F': handleHotkeySearch,
'Mod+Shift+S': handleHotkeySavedMessages,
'Mod+0': handleHotkeySavedMessages,
...(IS_MAC_OS && IS_PWA && { 'Mod+,': handleHotkeySettings }),
});