PinDMs: Fix duplicate channels

This commit is contained in:
Nuckyz 2024-12-12 19:46:48 -03:00
parent 5f1c5fa370
commit 40a8cf1a85
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -71,7 +71,7 @@ export default definePlugin({
replacement: [
{
// Filter out pinned channels from the private channel list
match: /(?<=\i,{channels:\i,)privateChannelIds:(\i)/,
match: /(?<=channels:\i,)privateChannelIds:(\i)(?=,listRef:)/,
replace: "privateChannelIds:$1.filter(c=>!$self.isPinned(c))"
},
{
@ -96,8 +96,8 @@ export default definePlugin({
// Fix Row Height
{
match: /(?<="getRowHeight",.{1,100}return 1===)\i/,
replace: "($&-$self.categoryLen())"
match: /(\.startsWith\("section-divider"\).+?return 1===)(\i)/,
replace: "$1($2-$self.categoryLen())"
},
{
match: /"getRowHeight",\((\i),(\i)\)=>{/,