Fetch local playlists only when adding to playlist in MediaItemMenu
This commit is contained in:
parent
d4f2b68ca3
commit
d85a9b68cd
1 changed files with 4 additions and 4 deletions
|
@ -292,10 +292,6 @@ fun MediaItemMenu(
|
|||
onShare: (() -> Unit)? = null,
|
||||
onGlobalRouteEmitted: (() -> Unit)? = null,
|
||||
) {
|
||||
val playlistPreviews by remember {
|
||||
Database.playlistPreviews(PlaylistSortBy.DateAdded, SortOrder.Descending)
|
||||
}.collectAsState(initial = emptyList(), context = Dispatchers.IO)
|
||||
|
||||
Menu(modifier = modifier) {
|
||||
RouteHandler(
|
||||
transitionSpec = {
|
||||
|
@ -311,6 +307,10 @@ fun MediaItemMenu(
|
|||
}
|
||||
) {
|
||||
viewPlaylistsRoute {
|
||||
val playlistPreviews by remember {
|
||||
Database.playlistPreviews(PlaylistSortBy.DateAdded, SortOrder.Descending)
|
||||
}.collectAsState(initial = emptyList(), context = Dispatchers.IO)
|
||||
|
||||
var isCreatingNewPlaylist by rememberSaveable {
|
||||
mutableStateOf(false)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue