fix(IgnoreActivities): Fix for upcoming change (#399)
This commit is contained in:
parent
19c9a13273
commit
b39cbcd934
|
@ -143,10 +143,10 @@ export default definePlugin({
|
||||||
authors: [Devs.Nuckyz],
|
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.",
|
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: [{
|
patches: [{
|
||||||
find: ".Messages.SETTINGS_GAMES_OVERLAY_ON",
|
find: ".Messages.SETTINGS_GAMES_TOGGLE_OVERLAY",
|
||||||
replacement: {
|
replacement: {
|
||||||
match: /this.renderLastPlayed\(\)]}\),this.renderOverlayToggle\(\)/,
|
match: /var .=(?<props>.)\.overlay.+?"aria-label":.\..\.Messages\.SETTINGS_GAMES_TOGGLE_OVERLAY.+?}}\)/,
|
||||||
replace: "$&,Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton(this.props)"
|
replace: "$&,Vencord.Plugins.plugins.IgnoreActivities.renderToggleGameActivityButton($<props>)"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
find: ".overlayBadge",
|
find: ".overlayBadge",
|
||||||
|
@ -189,12 +189,10 @@ export default definePlugin({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
renderToggleGameActivityButton(props: { game: { id?: string; exePath: string; } | null; }) {
|
renderToggleGameActivityButton(props: { id?: string; exePath: string; }) {
|
||||||
if (!props.game) return (null);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ErrorBoundary noop>
|
<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>
|
</ErrorBoundary>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue