GameActivityToggle: fix background colour when using nameplate

This commit is contained in:
Vendicated 2025-09-25 15:19:34 +02:00
parent 7c839be64f
commit c5a1bbd7db
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -60,7 +60,7 @@ function makeIcon(showCurrentGame?: boolean) {
};
}
function GameActivityToggleButton() {
function GameActivityToggleButton(props: { nameplate?: any; }) {
const showCurrentGame = ShowCurrentGame.useSetting();
return (
@ -70,6 +70,7 @@ function GameActivityToggleButton() {
role="switch"
aria-checked={!showCurrentGame}
redGlow={!showCurrentGame}
plated={props?.nameplate != null}
onClick={() => ShowCurrentGame.updateSetting(old => !old)}
/>
);
@ -97,7 +98,7 @@ export default definePlugin({
find: "#{intl::ACCOUNT_SPEAKING_WHILE_MUTED}",
replacement: {
match: /className:\i\.buttons,.{0,50}children:\[/,
replace: "$&$self.GameActivityToggleButton(),"
replace: "$&$self.GameActivityToggleButton(arguments[0]),"
}
}
],