homeTyping: ignore the user when checking for typing (#330)
* homeTyping: ignore the user when checking for typing * Update index.tsx --------- Co-authored-by: thororen <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
parent
d77d0eec02
commit
0009696678
1 changed files with 6 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
|||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findComponentByCodeLazy, findStoreLazy } from "@webpack";
|
||||
import { TypingStore, useStateFromStores } from "@webpack/common";
|
||||
import { TypingStore, UserStore, useStateFromStores } from "@webpack/common";
|
||||
|
||||
const ThreeDots = findComponentByCodeLazy(".dots,", "dotRadius:");
|
||||
|
||||
|
|
@ -21,7 +21,11 @@ export default definePlugin({
|
|||
return <ThreeDots dotRadius={3} themed={true} />;
|
||||
},
|
||||
isTyping() {
|
||||
return useStateFromStores([TypingStore], () => PrivateChannelSortStore.getPrivateChannelIds().some(id => Object.keys(TypingStore.getTypingUsers(id)).length > 0));
|
||||
return useStateFromStores([TypingStore], () =>
|
||||
PrivateChannelSortStore.getPrivateChannelIds().some(id =>
|
||||
Object.keys(TypingStore.getTypingUsers(id)).some(userId => userId !== UserStore.getCurrentUser().id)
|
||||
)
|
||||
);
|
||||
},
|
||||
patches: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue