beginning of work on fullscreen page

This commit is contained in:
Drew Weymouth
2024-03-01 16:59:04 -08:00
parent 1914821283
commit e719782437
6 changed files with 206 additions and 12 deletions
+2 -8
View File
@@ -2,7 +2,6 @@ package ui
import (
"image"
"log"
"time"
"github.com/dweymouth/supersonic/backend"
@@ -53,13 +52,8 @@ func NewBottomPanel(pm *backend.PlaybackManager, contr *controller.Controller) *
})
bp.NowPlaying = widgets.NewNowPlayingCard()
bp.NowPlaying.OnShowCoverImage = func() {
im, err := bp.ImageManager.GetFullSizeCoverArt(bp.coverArtID)
if err != nil {
log.Printf("error getting full size cover image: %s", err.Error())
} else {
contr.ShowPopUpImage(im)
}
bp.NowPlaying.OnCoverTapped = func() {
contr.NavigateTo(controller.FullscreenRoute())
}
bp.NowPlaying.OnSetFavorite = func(fav bool) {
contr.SetTrackFavorites([]string{pm.NowPlaying().ID}, fav)