fix: typingIndicator

This commit is contained in:
Jack Matthews 2023-10-25 11:48:17 -04:00 committed by V
parent 1130521e4b
commit 024a77c577

@ -26,7 +26,12 @@ import { ChannelStore, GuildMemberStore, RelationshipStore, Tooltip, UserStore,
import { buildSeveralUsers } from "../typingTweaks";
const ThreeDots = LazyComponent(() => find(m => m.type?.render?.toString()?.includes("().dots")));
const ThreeDots = LazyComponent(() => {
// This doesn't really need to explicitly find Dots' own module, but it's fine
const res = find(m => m.Dots && !m.Menu);
return res?.Dots;
});
const TypingStore = findStoreLazy("TypingStore");
const UserGuildSettingsStore = findStoreLazy("UserGuildSettingsStore");
@ -126,8 +131,8 @@ export default definePlugin({
{
find: ".UNREAD_HIGHLIGHT",
replacement: {
match: /\(\).children.+?:null(?<=(\i)=\i\.channel,.+?)/,
replace: (m, channel) => `${m},$self.TypingIndicator(${channel}.id)`
match: /channel:(\i).{0,100}?channelEmoji,.{0,250}?\.children.{0,50}?:null/,
replace: "$&,$self.TypingIndicator($1.id)"
}
}
],