コード例 #1
0
        private async Task RemoveConversationData()
        {
            var(baseResult, _) = await _viewModel.RemoveConversationAsync(_conversationId);

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

                await Navigation.PopAsync();

                break;

            case StatusCode.Unauthorized when _viewModel.IsModalAuthWasOpen:
                return;

            case StatusCode.Unauthorized:
                await Navigation.PopAsync();

                _viewModel.IsModalAuthWasOpen = true;
                break;

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

                break;
            }
        }