Prism: OnNavigatedFrom method is not called when we checkout between page in Menu (MasterDetailPage)

Created on 23 Oct 2018  路  8Comments  路  Source: PrismLibrary/Prism

Description

OnNavigatedFrom method is not called when we checkout between pages in Menu (MasterDetailPage)

Steps to Reproduce

  1. Click button Login
  2. Open Menu and Click ViewA
  3. You ought to notice that the OnNavigatedFrom method (in BasePageViewModel) is not called (you can see it in debug console)

Expected Behavior

When we navigate from BasePage from Menu to (for example) ViewA from Menu, the OnNavigatedFrom method has to called (for example to remove some events).

Actual Behavior

When we navigate from BasePage from Menu to (for example) ViewA from Menu, the OnNavigatedFrom method isn't called.

Basic Information

  • Version with issue: Prism: 7.1.0.431
  • Last known good version: 7.1.0.172-pre
  • Xamarin.Forms version: 3.3.0.912540

Screenshots

zrzut ekranu 2018-10-23 o 14 07 50

Reproduction Link

https://github.com/aneti9862/NavigationApp.git

XF bug

Most helpful comment

@brianlagunas I've tested your latest build and now, navigation is working OK, thanks for your fast fix.

All 8 comments

Thank you for reporting this. Seems this is a regression bug

This has been fixed. You can test the fix in the latest CI Build on MyGet.

@brianlagunas Thanks for your fast action. How can I test it? Should I remove this package: 7.1.0.431 and add again (it still isn't working)? There isn't any new pre-release package.

No, you must add the latest nightly build that is on our MyGet feed.

http://prismlibrary.github.io/docs/getting-started/NuGet-Packages.html

@brianlagunas I've tested your latest build and now, navigation is working OK, thanks for your fast fix.

I still have the issue that OnNavigatedTo is called ahead of OnNavigatedFrom with 3.1.0.517-ci. The call is no longer missing, but the order has changed.

You cannot depend on the order of which view is navigated away from or to. It will vary depending on the navigation stack. For example, if deep linking into a NavigationPage the nav stack is built in reverse order.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings