From 6b0caaae370bfa38ee40a572fd99ca99fe94a248 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 27 Oct 2022 15:25:51 -0300 Subject: fix(ShowHiddenChannels): Fix New unreads box for hidden channels #168 --- src/plugins/showHiddenChannels.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/plugins/showHiddenChannels.tsx') diff --git a/src/plugins/showHiddenChannels.tsx b/src/plugins/showHiddenChannels.tsx index 84f7c3e..b9f8270 100644 --- a/src/plugins/showHiddenChannels.tsx +++ b/src/plugins/showHiddenChannels.tsx @@ -93,6 +93,14 @@ export default definePlugin({ match: /(\w)\.connected,(\w)=(\w\.unread),(\w=\w\.canHaveDot)/g, replace: "$1.connected,$2=Vencord.Plugins.plugins.ShowHiddenChannels.isHiddenChannel($1.channel)?false:$3,$4" } + }, + { + // Hide New unreads box for hidden channels + find: '.displayName="ChannelListUnreadsStore"', + replacement: { + match: /((.)\.getGuildId\(\))(&&\(!\(.\.isThread.{1,100}\.hasRelevantUnread\()/, + replace: "$1&&!$2._isHiddenChannel$3" + } } ], shouldShow(channel, category, isMuted) { -- cgit