From afbfb641e8eb3583890f9264e6ede78e50dff0a7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 25 Jun 2023 06:57:18 -0300 Subject: Fix IgnoreActivities broken patch (#1337) --- src/plugins/ignoreActivities.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/plugins/ignoreActivities.tsx') diff --git a/src/plugins/ignoreActivities.tsx b/src/plugins/ignoreActivities.tsx index cf54648..6d58eb4 100644 --- a/src/plugins/ignoreActivities.tsx +++ b/src/plugins/ignoreActivities.tsx @@ -45,7 +45,7 @@ function ToggleIconOff() { className={RegisteredGamesClasses.overlayToggleIconOff} height="24" width="24" - viewBox="0 0 32 26" + viewBox="0 2.2 32 26" aria-hidden={true} role="img" > @@ -77,7 +77,7 @@ function ToggleIconOn({ forceWhite }: { forceWhite?: boolean; }) { className={RegisteredGamesClasses.overlayToggleIconOn} height="24" width="24" - viewBox="0 0 32 26" + viewBox="0 2.2 32 26" > @@ -157,10 +157,16 @@ export default definePlugin({ }, { find: ".overlayBadge", - replacement: { - match: /(?<=\(\)\.badgeContainer.+?(\i)\.name}\):null)/, - replace: (_, props) => `,$self.renderToggleActivityButton(${props})` - } + replacement: [ + { + match: /(?<=\(\)\.badgeContainer,children:).{0,50}?name:(\i)\.name.+?null/, + replace: (m, props) => `[${m},$self.renderToggleActivityButton(${props})]` + }, + { + match: /(?<=\(\)\.badgeContainer,children:).{0,50}?name:(\i\.application)\.name.+?null/, + replace: (m, props) => `${m},$self.renderToggleActivityButton(${props})` + } + ] }, { find: '.displayName="LocalActivityStore"', -- cgit