From d138876f8291c0f1ac3be7aafac88263d70e7503 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 8 Oct 2020 11:00:20 +0200 Subject: [PATCH] finish TrackActivity if there is no current song --- .../simplemobiletools/musicplayer/activities/TrackActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt index 3de656f4..e61d18da 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt @@ -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) } }