Reorganize actions location in LocalPlaylistSongs
This commit is contained in:
@@ -39,6 +39,8 @@ import it.vfsfitvnm.vimusic.ui.components.themed.Header
|
|||||||
import it.vfsfitvnm.vimusic.ui.components.themed.HeaderIconButton
|
import it.vfsfitvnm.vimusic.ui.components.themed.HeaderIconButton
|
||||||
import it.vfsfitvnm.vimusic.ui.components.themed.IconButton
|
import it.vfsfitvnm.vimusic.ui.components.themed.IconButton
|
||||||
import it.vfsfitvnm.vimusic.ui.components.themed.InPlaylistMediaItemMenu
|
import it.vfsfitvnm.vimusic.ui.components.themed.InPlaylistMediaItemMenu
|
||||||
|
import it.vfsfitvnm.vimusic.ui.components.themed.Menu
|
||||||
|
import it.vfsfitvnm.vimusic.ui.components.themed.MenuEntry
|
||||||
import it.vfsfitvnm.vimusic.ui.components.themed.PrimaryButton
|
import it.vfsfitvnm.vimusic.ui.components.themed.PrimaryButton
|
||||||
import it.vfsfitvnm.vimusic.ui.components.themed.SecondaryTextButton
|
import it.vfsfitvnm.vimusic.ui.components.themed.SecondaryTextButton
|
||||||
import it.vfsfitvnm.vimusic.ui.components.themed.TextFieldDialog
|
import it.vfsfitvnm.vimusic.ui.components.themed.TextFieldDialog
|
||||||
@@ -163,11 +165,18 @@ fun LocalPlaylistSongs(
|
|||||||
.weight(1f)
|
.weight(1f)
|
||||||
)
|
)
|
||||||
|
|
||||||
playlistWithSongs?.playlist?.browseId?.let { browseId ->
|
|
||||||
HeaderIconButton(
|
HeaderIconButton(
|
||||||
icon = R.drawable.sync,
|
icon = R.drawable.ellipsis_horizontal,
|
||||||
color = colorPalette.text,
|
color = colorPalette.text,
|
||||||
onClick = {
|
onClick = {
|
||||||
|
menuState.display {
|
||||||
|
Menu {
|
||||||
|
playlistWithSongs?.playlist?.browseId?.let { browseId ->
|
||||||
|
MenuEntry(
|
||||||
|
icon = R.drawable.sync,
|
||||||
|
text = "Sync",
|
||||||
|
onClick = {
|
||||||
|
menuState.hide()
|
||||||
transaction {
|
transaction {
|
||||||
runBlocking(Dispatchers.IO) {
|
runBlocking(Dispatchers.IO) {
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
@@ -194,16 +203,26 @@ fun LocalPlaylistSongs(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderIconButton(
|
MenuEntry(
|
||||||
icon = R.drawable.pencil,
|
icon = R.drawable.pencil,
|
||||||
color = colorPalette.text,
|
text = "Rename",
|
||||||
onClick = { isRenaming = true }
|
onClick = {
|
||||||
|
menuState.hide()
|
||||||
|
isRenaming = true
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
HeaderIconButton(
|
MenuEntry(
|
||||||
icon = R.drawable.trash,
|
icon = R.drawable.trash,
|
||||||
color = colorPalette.text,
|
text = "Delete",
|
||||||
onClick = { isDeleting = true }
|
onClick = {
|
||||||
|
menuState.hide()
|
||||||
|
isDeleting = true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user