playback: add song menu to panel
Add a non-queue version of the song menu to the playback panel. While the original UI flow of clicking on each TextView to navigate to a particular item is still present, this simply makes the action more clear to a first-time user.
This commit is contained in:
@@ -198,7 +198,7 @@ class DetailViewModel : ViewModel(), MusicStore.Callback {
|
||||
// "audio/raw" mime type
|
||||
MimeType(song.mimeType.fromExtension, formatMimeType)
|
||||
}
|
||||
|
||||
|
||||
DetailSong(song, bitrate, sampleRate, resolvedMimeType)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,6 @@ data class MimeType(val fromExtension: String, val fromFormat: String?) {
|
||||
"audio/wave",
|
||||
"audio/vnd.wave" -> R.string.cdc_wav
|
||||
"audio/x-ms-wma" -> R.string.cdc_wma
|
||||
|
||||
else -> -1
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import org.oxycblt.auxio.R
|
||||
import org.oxycblt.auxio.databinding.FragmentPlaybackPanelBinding
|
||||
import org.oxycblt.auxio.detail.SongDetailDialog
|
||||
import org.oxycblt.auxio.music.MusicParent
|
||||
import org.oxycblt.auxio.music.Song
|
||||
import org.oxycblt.auxio.playback.state.RepeatMode
|
||||
@@ -131,6 +132,20 @@ class PlaybackPanelFragment :
|
||||
navModel.mainNavigateTo(MainNavigationAction.QUEUE)
|
||||
true
|
||||
}
|
||||
R.id.action_go_artist -> {
|
||||
playbackModel.song.value?.let { navModel.exploreNavigateTo(it.album.artist) }
|
||||
true
|
||||
}
|
||||
R.id.action_go_album -> {
|
||||
playbackModel.song.value?.let { navModel.exploreNavigateTo(it.album) }
|
||||
true
|
||||
}
|
||||
R.id.action_song_detail -> {
|
||||
playbackModel.song.value?.let {
|
||||
SongDetailDialog.from(it).show(childFragmentManager, SongDetailDialog.TAG)
|
||||
}
|
||||
true
|
||||
}
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user