mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
fix the playlist bottomsheet items
This commit is contained in:
parent
9c207d2e80
commit
826e054790
@ -33,17 +33,16 @@ class PlaylistOptionsBottomSheet(
|
|||||||
private val shareData = ShareData(currentPlaylist = playlistName)
|
private val shareData = ShareData(currentPlaylist = playlistName)
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
// options for the dialog
|
// options for the dialog
|
||||||
var optionsList = listOf(
|
val optionsList = mutableListOf(
|
||||||
context?.getString(R.string.playOnBackground)!!,
|
context?.getString(R.string.playOnBackground)!!
|
||||||
context?.getString(R.string.clonePlaylist)!!,
|
|
||||||
context?.getString(R.string.share)!!
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (playlistType != PlaylistType.PUBLIC) {
|
if (playlistType == PlaylistType.PUBLIC) {
|
||||||
optionsList = optionsList +
|
optionsList.add(context?.getString(R.string.share)!!)
|
||||||
context?.getString(R.string.renamePlaylist)!! +
|
optionsList.add(context?.getString(R.string.clonePlaylist)!!)
|
||||||
context?.getString(R.string.deletePlaylist)!! -
|
} else {
|
||||||
context?.getString(R.string.clonePlaylist)!!
|
optionsList.add(context?.getString(R.string.renamePlaylist)!!)
|
||||||
|
optionsList.add(context?.getString(R.string.deletePlaylist)!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
setSimpleItems(optionsList) { which ->
|
setSimpleItems(optionsList) { which ->
|
||||||
|
Loading…
Reference in New Issue
Block a user