Fix #286: add "option button" to the right of current track title

This commit is contained in:
Drew Weymouth
2024-06-05 08:26:08 -07:00
parent 9566179649
commit b65bb707a8
3 changed files with 133 additions and 10 deletions
+5
View File
@@ -78,6 +78,11 @@ func NewBottomPanel(pm *backend.PlaybackManager, im *backend.ImageManager, contr
bp.NowPlaying.OnTrackNameTapped = func() {
contr.NavigateTo(controller.NowPlayingRoute(pm.NowPlaying().Metadata().ID))
}
bp.NowPlaying.OnShare = func() {
if tr, ok := pm.NowPlaying().(*mediaprovider.Track); ok {
contr.ShowShareDialog(tr.ID)
}
}
bp.Controls = widgets.NewPlayerControls()
bp.Controls.OnPlayPause(func() {
pm.PlayPause()