From 66a75747f80ad89e4047b378a7552847c1f2fd8e Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:44:13 -0500 Subject: [PATCH] ViewIcons: Fix conflict with unread Group DMs (#3011) --- src/plugins/viewIcons/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index 62970814..c53116b4 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -209,10 +209,11 @@ export default definePlugin({ }, // Group DMs top small & large icon { - find: /\.recipients\.length>=2(?! `${m},onClick:()=>$self.openAvatar(${iconUrl})` + // We have to check that icon is not an unread GDM in the server bar + replace: (m, iconUrl) => `${m},onClick:()=>arguments[0]?.size!=="SIZE_48"&&$self.openAvatar(${iconUrl})` } }, // User DMs top small icon