Esempio n. 1
0
        protected override async Task LoadData(bool isRefresh, bool add = false, int offset = 0)
        {
            if (_appsLoaded && !isRefresh)
            {
                return;
            }

            HasErrors = false;

            SetProgressBar("Getting apps...");

            try
            {
                var response = await _vidMeClient.GetAuthorisedAppsAsync();

                Items = new ObservableCollection <RevokeAppViewModel>(response.Select(x => new RevokeAppViewModel(x, _vidMeClient, this, _messageBoxService)));

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

            SetProgressBar();
        }