예제 #1
0
        protected override async Task LoadData(bool isRefresh, bool add = false, int offset = 0)
        {
            if (ItemsLoaded && !isRefresh)
            {
                return;
            }

            HasErrors = false;

            try
            {
                SetProgressBar("Getting apps...");

                var response = await _vidMeClient.GetOwnedAppsAsync();

                Items = new ObservableCollection <OwnedAppViewModel>(response.Select(x => new OwnedAppViewModel(x)));

                ItemsLoaded = true;
            }
            catch (Exception ex)
            {
                Log.ErrorException("LoadData()", ex);
                HasErrors = true;
            }

            SetProgressBar();
        }