fix(immersive): close lyrics sidebar when entering immersive (#47)
Lyrics sidebar was staying open behind the immersive player, causing duplicate CPU usage for synced lyrics rendering. Now hideLyricsSidebar is called alongside closeAllMenus when opening fullscreen or focus mode.
This commit is contained in:
1 parent
2f5f5ff8a6
commit
af0e235bb2
1 file changed
+3
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
import { closeAll as closeAllMenus } from './floatingMenuStore';
|
||||
import { hideSidebar as hideLyricsSidebar } from './lyricsStore';
|
||||
|
||||
// Overlay states
|
||||
let isQueueOpen = false;
|
||||
@@ -66,6 +67,7 @@ export function getFullScreenOpen(): boolean {
|
||||
|
||||
export function openFullScreen(): void {
|
||||
closeAllMenus();
|
||||
hideLyricsSidebar();
|
||||
isFullScreenOpen = true;
|
||||
notifyListeners();
|
||||
}
|
||||
@@ -88,6 +90,7 @@ export function getFocusModeOpen(): boolean {
|
||||
|
||||
export function openFocusMode(): void {
|
||||
closeAllMenus();
|
||||
hideLyricsSidebar();
|
||||
isFocusModeOpen = true;
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user