playback: add playing from indicator to fragment

Add the "Playing From" indicator that used be on the queue to the
main playback view.
This commit is contained in:
OxygenCobalt
2022-01-08 09:26:26 -07:00
parent 13730c303c
commit 049b279e1f
7 changed files with 10 additions and 1 deletions
@@ -84,7 +84,7 @@ data class Song(
val album: Album get() = requireNotNull(mAlbum)
val seconds: Long get() = duration / 1000
val formattedDuration: String get() = (duration / 1000).toDuration(false)
val formattedDuration: String get() = seconds.toDuration(false)
override val hash: Long get() {
var result = name.hashCode().toLong()
@@ -111,6 +111,10 @@ class PlaybackFragment : Fragment() {
}
}
playbackModel.parent.observe(viewLifecycleOwner) { parent ->
binding.playbackToolbar.subtitle = parent?.name ?: getString(R.string.lbl_all_songs)
}
playbackModel.isShuffling.observe(viewLifecycleOwner) { isShuffling ->
binding.playbackShuffle.isActivated = isShuffling
}