Support ⌘+0 hotkey for opening Saved Messages (#1947)
This commit is contained in:
parent
56110bba0e
commit
cbea850d92
@ -318,7 +318,7 @@ const LeftColumn: FC<StateProps> = ({
|
|||||||
|
|
||||||
const handleHotkeySavedMessages = useCallback((e: KeyboardEvent) => {
|
const handleHotkeySavedMessages = useCallback((e: KeyboardEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
openChat({ id: currentUserId });
|
openChat({ id: currentUserId, shouldReplaceHistory: true });
|
||||||
}, [currentUserId, openChat]);
|
}, [currentUserId, openChat]);
|
||||||
|
|
||||||
const handleHotkeySettings = useCallback((e: KeyboardEvent) => {
|
const handleHotkeySettings = useCallback((e: KeyboardEvent) => {
|
||||||
@ -329,6 +329,7 @@ const LeftColumn: FC<StateProps> = ({
|
|||||||
useHotkeys({
|
useHotkeys({
|
||||||
'Mod+Shift+F': handleHotkeySearch,
|
'Mod+Shift+F': handleHotkeySearch,
|
||||||
'Mod+Shift+S': handleHotkeySavedMessages,
|
'Mod+Shift+S': handleHotkeySavedMessages,
|
||||||
|
'Mod+0': handleHotkeySavedMessages,
|
||||||
...(IS_MAC_OS && IS_PWA && { 'Mod+,': handleHotkeySettings }),
|
...(IS_MAC_OS && IS_PWA && { 'Mod+,': handleHotkeySettings }),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user