Caught "null values from musicHistory.peekLast" bug

This commit is contained in:
yairm210 2021-11-13 22:38:58 +02:00
parent 5910e52407
commit c41fb3591a

View File

@ -87,7 +87,7 @@ class MusicController {
/** @return the path of the playing track or null if none playing */
private fun currentlyPlaying(): String = when(state) {
ControllerState.Playing, ControllerState.PlaySingle, ControllerState.Pause ->
musicHistory.peekLast()
musicHistory.peekLast() ?: ""
else -> ""
}