private async System.Threading.Tasks.Task DeleteList() { AreBtnsEn = false; var deleteResult = await n_Restctrl.DeleteList(ListID); bool answer = await Application.Current.MainPage.DisplayAlert("Delete List", "Are you sure?", "Yes", "No"); if (answer) { if (deleteResult.StatusCode == HttpStatusCode.OK) { await Navigation.PushAsync(new MenuListsView()); } else if (deleteResult.StatusCode == HttpStatusCode.Unauthorized) { await Application.Current.MainPage.DisplayAlert("Sorry", "You do not have permission to do this", "Ok"); } else { await Application.Current.MainPage.DisplayAlert("Sorry", "Something went wrong, check your connection", "Ok"); } } else { return; } AreBtnsEn = true; }