From 5c1bb147f0c375ab8b25f90816f5ca8df3c19841 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 8 Jul 2022 23:38:52 +0200 Subject: [PATCH] removing a wrong menu from albums --- .../simplemobiletools/musicplayer/activities/TracksActivity.kt | 2 +- app/src/main/res/layout/activity_albums.xml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TracksActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TracksActivity.kt index ecdbacb9..b26c2c30 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TracksActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TracksActivity.kt @@ -64,7 +64,6 @@ class TracksActivity : SimpleActivity() { playlist = Gson().fromJson(intent.getStringExtra(PLAYLIST), playlistType) if (playlist != null) { tracksType = TYPE_PLAYLIST - invalidateOptionsMenu() } val albumType = object : TypeToken() {}.type @@ -79,6 +78,7 @@ class TracksActivity : SimpleActivity() { tracks_placeholder_2.beGone() } + refreshMenuItems() val titleToUse = playlist?.title ?: album?.title ?: folder ?: "" tracks_toolbar.title = titleToUse.replace("<", "<") diff --git a/app/src/main/res/layout/activity_albums.xml b/app/src/main/res/layout/activity_albums.xml index 73178477..f385b1d4 100644 --- a/app/src/main/res/layout/activity_albums.xml +++ b/app/src/main/res/layout/activity_albums.xml @@ -16,7 +16,6 @@ android:layout_height="?attr/actionBarSize" android:background="@color/color_primary" app:layout_scrollFlags="scroll|enterAlways" - app:menu="@menu/menu_playlist" app:title="@string/artist" app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />