Beispiel #1
0
        async Task ExecuteLoadPodcasts()
        {
            if (IsBusy)
            {
                return;
            }
            try
            {
                IsBusy = true;

                var pods = await DataService.GetPodcastsAsync(false);

                if (Podcasts.Count > 0)
                {
                    Podcasts.ReplaceRange(pods);
                }
                else
                {
                    Podcasts.AddRange(pods);
                }
                //OnPropertyChanged(nameof(Podcasts));
            }
            catch (Exception ex)
            {
#if DEBUG
                await App.Current.MainPage.DisplayAlert("Error", ex.Message, "OK");
#endif
            }
            finally
            {
                IsBusy = false;
            }
        }