1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Convert if/else add/remove statements to toggle

This commit is contained in:
Georgi Stamatov 2023-04-18 20:17:25 +03:00
parent f3b84cadad
commit 14fca37e78

View file

@ -336,11 +336,8 @@ import { appRouter } from '../appRouter';
toggleRepeatButton.classList.remove('hide'); toggleRepeatButton.classList.remove('hide');
} }
if (supportedCommands.indexOf('AirPlay') === -1) { const hideAirPlayButton = supportedCommands.indexOf('AirPlay') === -1;
toggleAirPlayButton.classList.add('hide'); toggleAirPlayButton.classList.toggle('hide', hideAirPlayButton);
} else {
toggleAirPlayButton.classList.remove('hide');
}
updateRepeatModeDisplay(playbackManager.getRepeatMode()); updateRepeatModeDisplay(playbackManager.getRepeatMode());
onQueueShuffleModeChange(); onQueueShuffleModeChange();