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(() => {
|
useEffect(() => {
|
||||||
if (!isAllowed || !html.length) {
|
if (!isAllowed || !html.length) {
|
||||||
unmarkIsOpen();
|
setFilteredBotCommands(undefined);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ export default function useBotCommandTooltip(
|
|||||||
const filter = prepareForRegExp(html.substr(1)).match(RE_COMMAND);
|
const filter = prepareForRegExp(html.substr(1)).match(RE_COMMAND);
|
||||||
getFilteredCommands(filter ? filter[0] : '');
|
getFilteredCommands(filter ? filter[0] : '');
|
||||||
} else {
|
} else {
|
||||||
unmarkIsOpen();
|
setFilteredBotCommands(undefined);
|
||||||
}
|
}
|
||||||
}, [getFilteredCommands, html, isAllowed, unmarkIsOpen]);
|
}, [getFilteredCommands, html, isAllowed, unmarkIsOpen]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user