From 6b59c2f77f359ed0f81da21025dfa6cdd515d6ee Mon Sep 17 00:00:00 2001 From: h4h13 Date: Mon, 28 Oct 2019 22:19:35 +0530 Subject: [PATCH] Fix title for now playing theme dialog --- .../name/monkey/retromusic/dialogs/AddToPlaylistDialog.kt | 7 +++---- .../preferences/NowPlayingScreenPreferenceDialog.kt | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/code/name/monkey/retromusic/dialogs/AddToPlaylistDialog.kt b/app/src/main/java/code/name/monkey/retromusic/dialogs/AddToPlaylistDialog.kt index 3a7e26f6..0cf5f072 100644 --- a/app/src/main/java/code/name/monkey/retromusic/dialogs/AddToPlaylistDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/dialogs/AddToPlaylistDialog.kt @@ -33,10 +33,9 @@ class AddToPlaylistDialog : DialogFragment() { override fun onCreateDialog( savedInstanceState: Bundle? ): Dialog { - val cntx = requireContext() - val playlists = PlaylistLoader.getAllPlaylists(cntx) + val playlists = PlaylistLoader.getAllPlaylists(requireContext()) val playlistNames: MutableList = mutableListOf() - playlistNames.add(cntx.resources.getString(R.string.action_new_playlist)) + playlistNames.add(requireContext().resources.getString(R.string.action_new_playlist)) for (p in playlists) { playlistNames.add(p.name) } @@ -51,7 +50,7 @@ class AddToPlaylistDialog : DialogFragment() { activity?.supportFragmentManager?.let { CreatePlaylistDialog.create(songs).show(it, "ADD_TO_PLAYLIST") } } else { dialog.dismiss() - PlaylistsUtil.addToPlaylist(cntx, songs, playlists[index - 1].id, true) + PlaylistsUtil.addToPlaylist(requireContext(), songs, playlists[index - 1].id, true) } } } diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt index e174471a..364f60d3 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/NowPlayingScreenPreferenceDialog.kt @@ -92,7 +92,7 @@ class NowPlayingScreenPreferenceDialog : PreferenceDialogFragmentCompat(), ViewP return MaterialDialog(requireContext()).show { - title(R.string.pref_title_album_cover_style) + title(R.string.pref_title_now_playing_screen_appearance) positiveButton(R.string.set) { val nowPlayingScreen = NowPlayingScreen.values()[viewPagerPosition] if (isNowPlayingThemes(nowPlayingScreen)) {