forked from Ivasoft/mattermost-mobile
Fix other name showing on typing (#6532)
This commit is contained in:
committed by
GitHub
parent
a18bc6cde1
commit
78f7acde87
@@ -96,7 +96,7 @@ function Typing({
|
||||
} else if (mounted.current) {
|
||||
setRefresh(Date.now());
|
||||
}
|
||||
}, []);
|
||||
}, [channelId, rootId]);
|
||||
|
||||
useEffect(() => {
|
||||
mounted.current = true;
|
||||
@@ -123,6 +123,15 @@ function Typing({
|
||||
typingHeight.value = typing.current.length ? TYPING_HEIGHT : 0;
|
||||
}, [refresh]);
|
||||
|
||||
useEffect(() => {
|
||||
typing.current = [];
|
||||
typingHeight.value = 0;
|
||||
if (timeoutToDisappear.current) {
|
||||
clearTimeout(timeoutToDisappear.current);
|
||||
timeoutToDisappear.current = undefined;
|
||||
}
|
||||
}, [channelId, rootId]);
|
||||
|
||||
const renderTyping = () => {
|
||||
const nextTyping = typing.current.map(({username}) => username);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user