From cef806a2438694bca7c232876dfd2e3883c98abe Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Tue, 1 Apr 2025 22:22:47 -0400 Subject: [PATCH] PlainFolderIcon: Fix on new UI (#3317) --- src/plugins/plainFolderIcon/index.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/plugins/plainFolderIcon/index.ts b/src/plugins/plainFolderIcon/index.ts index 4c37e1e8d..bb6876b5b 100644 --- a/src/plugins/plainFolderIcon/index.ts +++ b/src/plugins/plainFolderIcon/index.ts @@ -25,9 +25,19 @@ export default definePlugin({ authors: [Devs.botato], patches: [{ find: ".expandedFolderIconWrapper", - replacement: [{ - match: /\(\w\|\|\w\)&&(\(.{0,40}\(.{1,3}\.animated)/, - replace: "$1", - }] + replacement: [ + // there are two elements, the first one is the plain folder icon + // the second is the four guild preview icons + // always show this one (the plain icons) + { + match: /\(\i\|\|\i\)&&(\(.{0,40}\(\i\.animated)/, + replace: "$1", + }, + // and never show this one (the guild preview icons) + { + match: /\(\i\|\|!\i\)&&(\(.{0,40}\(\i\.animated)/, + replace: "false&&$1", + } + ] }] });