fix(ShowHiddenChannels): Fix New unreads box for hidden channels #168

This commit is contained in:
Nuckyz 2022-10-27 15:25:51 -03:00 committed by Vendicated
parent c76e9f5e3d
commit 6b0caaae37
No known key found for this signature in database
GPG Key ID: EC781ADFB93EFFA3

@ -93,6 +93,14 @@ export default definePlugin({
match: /(\w)\.connected,(\w)=(\w\.unread),(\w=\w\.canHaveDot)/g, match: /(\w)\.connected,(\w)=(\w\.unread),(\w=\w\.canHaveDot)/g,
replace: "$1.connected,$2=Vencord.Plugins.plugins.ShowHiddenChannels.isHiddenChannel($1.channel)?false:$3,$4" 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) { shouldShow(channel, category, isMuted) {