Exemplo n.º 1
0
        private async Task UnblockUser(int targetUserIdToBlock)
        {
            var(baseResult, _) = await _viewModel.UnblockUserAsync(targetUserIdToBlock);

            switch (baseResult.Result)
            {
            case StatusCode.Ok:
                await DisplayAlert(AppResources.Notification, AppResources.UserSuccessfullyUnblocked, AppResources.Ok);

                break;

            case StatusCode.Unauthorized:
                await DisplayAlert(AppResources.Notification, AppResources.LoginBeforeBlocking, AppResources.Ok);

                break;

            default:
                await DisplayAlert(AppResources.Notification, baseResult.Message, AppResources.Ok);

                break;
            }
        }