From d108193d5ea09c8245f5a1b1d2596c0f5b165604 Mon Sep 17 00:00:00 2001 From: h4h13 Date: Thu, 28 Nov 2019 19:52:02 +0530 Subject: [PATCH] Add cab finish --- .../monkey/retromusic/activities/AlbumDetailsActivity.kt | 8 ++++++++ .../monkey/retromusic/activities/ArtistDetailActivity.kt | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt index 94075cff..87e15ffc 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt @@ -291,6 +291,14 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView, C } } + override fun onBackPressed() { + if (cab != null && cab!!.isActive) { + cab?.finish() + } else { + super.onBackPressed() + } + } + companion object { const val EXTRA_ALBUM_ID = "extra_album_id" diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt index 34858e55..5f24d7c5 100755 --- a/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/ArtistDetailActivity.kt @@ -311,6 +311,14 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailsView, } } + override fun onBackPressed() { + if (cab != null && cab!!.isActive) { + cab?.finish() + } else { + super.onBackPressed() + } + } + companion object { const val EXTRA_ARTIST_ID = "extra_artist_id"