private async Task LoadFavStations() { await DispatcherHelper.UIDispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { FavChannels.Clear(); var items = _dataService.LoadFavStations(); foreach (var item in items) { FavChannels.Add(item); } if (FavChannels.Count > 0) { AreFavoritesPresent = true; } else { AreFavoritesPresent = false; } }); }
private void AddToFavStations() { if (SelectedChannel != null) { SelectedChannel.IsFav = true; FavChannels.Clear(); var items = _dataService.AddToFavChannels(SelectedChannel); foreach (var item in items) { FavChannels.Add(item); } if (FavChannels.Count > 0) { AreFavoritesPresent = true; } else { AreFavoritesPresent = false; } } }