diff --git a/src/components/main/ForwardPicker.tsx b/src/components/main/ForwardPicker.tsx index 4f24e4e5a..af53e19b6 100644 --- a/src/components/main/ForwardPicker.tsx +++ b/src/components/main/ForwardPicker.tsx @@ -100,6 +100,11 @@ const ForwardPicker: FC = ({ } }, [openChatWithText, resetSwitchBotInline, setForwardChatId, switchBotInline]); + const handleClose = useCallback(() => { + exitForwardMode(); + resetSwitchBotInline(); + }, [exitForwardMode, resetSwitchBotInline]); + const renderingChatAndContactIds = useCurrentOrPrev(chatAndContactIds, true)!; if (!isOpen && !isShown) { @@ -116,7 +121,7 @@ const ForwardPicker: FC = ({ filter={filter} onFilterChange={setFilter} onSelectChatOrUser={handleSelectUser} - onClose={exitForwardMode} + onClose={handleClose} onCloseAnimationEnd={unmarkIsShown} /> );