A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix favourites-toggle issue

+14 -6
+14 -6
src/App/Tracks/Collection/Internal.elm
··· 81 81 isNowPlaying = 82 82 Just track.id == activeTrackId 83 83 84 - idx = 85 - List.findIndex (Favourites.matcher lartist ltitle) missingFavourites 84 + favouriteMatcher = 85 + Favourites.matcher lartist ltitle 86 + 87 + isFavourite = 88 + List.any favouriteMatcher favourites 86 89 in 87 - case idx of 90 + case isFavourite of 88 91 -- A favourite 89 92 -- 90 - Just i -> 93 + True -> 91 94 ( acc 92 95 ++ [ ( { isFavourite = True 93 96 , isMissing = False ··· 96 99 , track 97 100 ) 98 101 ] 99 - , List.removeAt i missingFavourites 102 + , case List.findIndex favouriteMatcher missingFavourites of 103 + Just i -> 104 + List.removeAt i missingFavourites 105 + 106 + Nothing -> 107 + missingFavourites 100 108 ) 101 109 102 110 -- Not a favourite 103 111 -- 104 - Nothing -> 112 + False -> 105 113 ( acc 106 114 ++ [ ( { isFavourite = False 107 115 , isMissing = False