updateAppStatus :: PlayerApp -> Status -> Int -> PlayerApp
updateAppStatus app@(PlayerApp l _ _ _) status pos =
    app {
        songsList = L.listReplace songs' mPos l,
        playerStatus = status
      }
  where
    songs = L.listElements l
    mPos = l ^. L.listSelectedL
    song = songs Vec.! pos
    songs' = songs Vec.// [(pos, song { songStatus = status })]


-- | App events handler.
updateAppStatus :: PlayerApp -> Status -> Int -> PlayerApp
updateAppStatus app@(PlayerApp l _ _ _) status pos =
    app {
        songsList = L.listReplace songs' mPos l,
        playerStatus = status
      }
  where
    songs = L.listElements l
    mPos = l ^. L.listSelectedL
    song = songs Vec.! pos
    songs' = songs Vec.// [(pos, song { songStatus = status })]


-- | App events handler.
updateAppStatus app@(PlayerApp l _ _ _) status pos =
    app {
        songsList = L.listReplace songs' mPos l,
        playerStatus = status
      }
  where
    songs = L.listElements l
    mPos = l ^. L.listSelectedL
    song = songs Vec.! pos
    songs' = songs Vec.// [(pos, song { songStatus = status })]


-- | App events handler.