Esempio n. 1
0
        private async Task LoadProfileData()
        {
            var(baseResult, content) = await _viewModel.LoadProfileAsync(_userId);

            switch (baseResult.Result)
            {
            case StatusCode.Ok:
                _viewModel.FillProfile(content);
                _viewModel.IsBusy = false;
                break;

            case StatusCode.NotAcceptable:
                await DisplayAlert(AppResources.Notification, AppResources.YouHaveBeenBlocked, AppResources.Ok);

                _viewModel.IsBusy = false;
                await Navigation.PopAsync();

                break;

            default:
                _viewModel.IsBusy = false;
                await DisplayAlert(AppResources.Notification, baseResult.Message, AppResources.Ok);

                break;
            }
        }