Use singleton in GameBar

This commit is contained in:
redphx
2024-05-11 11:48:07 +07:00
parent b3033089ed
commit 40b61b173f
4 changed files with 84 additions and 71 deletions

View File

@@ -20,13 +20,15 @@ export const BxExposed = {
return;
}
const gameBar = GameBar.getInstance();
if (!STATES.isPlaying) {
GameBar.disable();
gameBar.disable();
return;
}
// Toggle Game bar
mode !== 'None' ? GameBar.disable() : GameBar.enable();
mode !== 'None' ? gameBar.disable() : gameBar.enable();
},
getTitleInfo: () => STATES.currentStream.titleInfo,