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:
VR 2025-08-07 17:36:24 -04:00 • committed by GitHub
parent d77d0eec02
commit 0009696678
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: [
{