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');
}
if (supportedCommands.indexOf('AirPlay') === -1) {
toggleAirPlayButton.classList.add('hide');
} else {
toggleAirPlayButton.classList.remove('hide');
}
const hideAirPlayButton = supportedCommands.indexOf('AirPlay') === -1;
toggleAirPlayButton.classList.toggle('hide', hideAirPlayButton);
updateRepeatModeDisplay(playbackManager.getRepeatMode());
onQueueShuffleModeChange();