1
0
mirror of synced 2025-01-18 15:54:06 +01:00

Fixed Favourites not being properly set in the Song list

This commit is contained in:
Farewell_ 2024-08-09 15:10:53 +02:00
parent a45959c96c
commit 00791f3cae

View File

@ -33,6 +33,11 @@ public partial class SongList
SongNameLanguage = await LocalStorage.GetItemAsync<string>("songNameLanguage");
foreach (var best in response.SongBestData)
foreach (var song in musicDetailDictionary)
if (best.SongId == song.Value.SongId)
song.Value.IsFavorite = best.IsFavorite;
if (AuthService.IsLoggedIn && !AuthService.IsAdmin)
{
breadcrumbs.Add(new BreadcrumbItem(Localizer["Dashboard"], href: "/"));
@ -59,6 +64,8 @@ public partial class SongList
musicDetail.ArtistNameKO
};
if (musicDetail.IsFavorite) stringsToCheck.Add("Favorite");
if (!string.IsNullOrEmpty(Search) && !stringsToCheck.Any(s => s.Contains(Search, StringComparison.OrdinalIgnoreCase)))
{
return false;