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
1 changed files with 8 additions and 0 deletions

View File

@ -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) {