aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/ignoreActivities.tsx
diff options
context:
space:
mode:
authorNuckyz <61953774+Nuckyz@users.noreply.github.com>2023-01-11 22:50:31 -0300
committerGitHub <noreply@github.com>2023-01-12 02:50:31 +0100
commitb39cbcd934f55f3eb9f1f18a04ea084a4b281022 (patch)
treecc1b5596b824bb1209933db14f21a2dacc2c28bc /src/plugins/ignoreActivities.tsx
parent19c9a132733dfb67de6d62d6da1348944cbe1146 (diff)
downloadVencord-b39cbcd934f55f3eb9f1f18a04ea084a4b281022.tar.gz
Vencord-b39cbcd934f55f3eb9f1f18a04ea084a4b281022.tar.bz2
Vencord-b39cbcd934f55f3eb9f1f18a04ea084a4b281022.zip
fix(IgnoreActivities): Fix for upcoming change (#399)
Diffstat (limited to 'src/plugins/ignoreActivities.tsx')
-rw-r--r--src/plugins/ignoreActivities.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/ignoreActivities.tsx b/src/plugins/ignoreActivities.tsx
index cfaaafd..3b1ee98 100644
--- a/src/plugins/ignoreActivities.tsx
+++ b/src/plugins/ignoreActivities.tsx
@@ -143,10 +143,10 @@ export default definePlugin({
authors: [Devs.Nuckyz],
description: "Ignore certain activities (like games and actual activities) from showing up on your status. You can configure which ones are ignored from the Registered Games and Activities tabs.",
patches: [{
- find: ".Messages.SETTINGS_GAMES_OVERLAY_ON",
+ find: ".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",
replacement: {
- match: /this.renderLastPlayed\(\)]}\),this.renderOverlayToggle\(\)/,
- replace: "$&,Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton(this.props)"
+ match: /var .=(?<props>.)\.overlay.+?"aria-label":.\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}}\)/,
+ replace: "$&,Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton($<props>)"
}
}, {
find: ".overlayBadge",
@@ -189,12 +189,10 @@ export default definePlugin({
}
},
- renderToggleGameActivityButton(props: { game: { id?: string; exePath: string; } | null; }) {
- if (!props.game) return (null);
-
+ renderToggleGameActivityButton(props: { id?: string; exePath: string; }) {
return (
<ErrorBoundary noop>
- <ToggleActivityComponent activity={{ id: props.game.id ?? props.game.exePath, type: ActivitiesTypes.Game }} />
+ <ToggleActivityComponent activity={{ id: props.id ?? props.exePath, type: ActivitiesTypes.Game }} />
</ErrorBoundary>
);
},