add item menus to the detail screens and now playing

Album, artist and playlist detail screens get a more button plus long-press on their song
and album rows; now playing gets a more button for the current song. Song menus can reach
the album and artist and star; the now-playing song is read from Room so its star state is
current.
This commit is contained in:
austinried
2026-10-04 00:29:59 +00:00
parent fb9e985680
commit d9e9a6b865
12 changed files with 208 additions and 16 deletions
@@ -8,6 +8,7 @@ import com.subtracks.data.model.Disc
import com.subtracks.data.model.Song
import com.subtracks.data.repo.LibraryRepository
import com.subtracks.data.repo.SourceRepository
import com.subtracks.data.source.StarType
import com.subtracks.playback.PlaybackController
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
@@ -53,4 +54,12 @@ class AlbumDetailViewModel(
playbackController.shuffleAlbum(sourceId.first(), albumId)
}
}
fun setStar(
type: StarType,
id: String,
starred: Boolean,
) {
viewModelScope.launch { libraryRepository.setStar(type, id, starred) }
}
}