mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 20:34:44 +01:00
Bot Command Tooltip: Fix flickering when sending command (#1746)
This commit is contained in:
parent
d65e9937b5
commit
2ce560cf1a
@ -38,7 +38,7 @@ export default function useBotCommandTooltip(
|
||||
|
||||
useEffect(() => {
|
||||
if (!isAllowed || !html.length) {
|
||||
unmarkIsOpen();
|
||||
setFilteredBotCommands(undefined);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ export default function useBotCommandTooltip(
|
||||
const filter = prepareForRegExp(html.substr(1)).match(RE_COMMAND);
|
||||
getFilteredCommands(filter ? filter[0] : '');
|
||||
} else {
|
||||
unmarkIsOpen();
|
||||
setFilteredBotCommands(undefined);
|
||||
}
|
||||
}, [getFilteredCommands, html, isAllowed, unmarkIsOpen]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user