From 40a8cf1a85510f2b4c302e84a52946f7d63fe86e Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:46:48 -0300 Subject: [PATCH] PinDMs: Fix duplicate channels --- src/plugins/pinDms/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/pinDms/index.tsx b/src/plugins/pinDms/index.tsx index 620a615a..3246c441 100644 --- a/src/plugins/pinDms/index.tsx +++ b/src/plugins/pinDms/index.tsx @@ -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)\)=>{/,