Fix title for now playing theme dialog

This commit is contained in:
h4h13 2019-10-28 22:19:35 +05:30
parent e31a1a6e2f
commit 6b59c2f77f
2 changed files with 4 additions and 5 deletions

View file

@ -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<String> = 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)
}
}
}

View file

@ -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)) {