[UITests] fix dismiss page crash (#4251)
This commit is contained in:
Родитель
e6d060087e
Коммит
bb58503c1a
|
@ -48,7 +48,13 @@ namespace Xamarin.Forms.Controls
|
|||
|
||||
var modalDismissButton = new Button () {
|
||||
Text = "Dismiss Page",
|
||||
Command = new Command (async () => await Navigation.PopModalAsync ())
|
||||
Command = new Command (async () =>
|
||||
{
|
||||
if (_picker.SelectedIndex == 0)
|
||||
await Navigation.PopAsync();
|
||||
else
|
||||
_picker.SelectedIndex--;
|
||||
})
|
||||
};
|
||||
Layout.Children.Add (modalDismissButton);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче