Open
Description
When debugging Android I came across this issue when switching to a different app, pulling the app back from the background and trying to open a Page with PushPageModel through a FreshAwaitCommand. Only the constructor of the PageModel gets called when calling PushPageModel. After that nothing happens. I'm calling PushPageModel from a switch statement and it does not matter which PageModel i'm trying to open.
Here is a short version of the code used to open a page.
Command
PushPageCommand = new FreshAwaitCommand(async (obj) =>
{
if (this.morePageItem?.Title != null)
{
await this.PushModel(this.morePageItem.Title);
}
obj.SetResult(true);
});
Switch
private async Task PushModel(string title)
{
switch (title)
{
case AboutTitle
await CoreMethods.PushPageModel<AboutPageModel>();
break;
case SettingsTitle:
await CoreMethods.PushPageModel<SettingsPageModel>();
break;
case LogoutTitle:
await api.Logout();
}
}
Metadata
Metadata
Assignees
Labels
No labels