Forward Picker: Fix closing when switching to inline bot (#1866)
This commit is contained in:
parent
188251f0fb
commit
810f2bdd65
@ -100,6 +100,11 @@ const ForwardPicker: FC<OwnProps & StateProps> = ({
|
|||||||
}
|
}
|
||||||
}, [openChatWithText, resetSwitchBotInline, setForwardChatId, switchBotInline]);
|
}, [openChatWithText, resetSwitchBotInline, setForwardChatId, switchBotInline]);
|
||||||
|
|
||||||
|
const handleClose = useCallback(() => {
|
||||||
|
exitForwardMode();
|
||||||
|
resetSwitchBotInline();
|
||||||
|
}, [exitForwardMode, resetSwitchBotInline]);
|
||||||
|
|
||||||
const renderingChatAndContactIds = useCurrentOrPrev(chatAndContactIds, true)!;
|
const renderingChatAndContactIds = useCurrentOrPrev(chatAndContactIds, true)!;
|
||||||
|
|
||||||
if (!isOpen && !isShown) {
|
if (!isOpen && !isShown) {
|
||||||
@ -116,7 +121,7 @@ const ForwardPicker: FC<OwnProps & StateProps> = ({
|
|||||||
filter={filter}
|
filter={filter}
|
||||||
onFilterChange={setFilter}
|
onFilterChange={setFilter}
|
||||||
onSelectChatOrUser={handleSelectUser}
|
onSelectChatOrUser={handleSelectUser}
|
||||||
onClose={exitForwardMode}
|
onClose={handleClose}
|
||||||
onCloseAnimationEnd={unmarkIsShown}
|
onCloseAnimationEnd={unmarkIsShown}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user