finish TrackActivity if there is no current song

This commit is contained in:
tibbi 2020-10-08 11:00:20 +02:00
parent daf395734a
commit d138876f82

View file

@ -177,7 +177,9 @@ class TrackActivity : SimpleActivity() {
@Subscribe(threadMode = ThreadMode.MAIN)
fun songChangedEvent(event: Events.SongChanged) {
val song = event.song
if (song != null) {
if (song == null) {
finish()
} else {
setupTrackInfo(event.song)
}
}