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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user