Closed TimLariviere closed 2 years ago
I tried it against the repro branch and it was working perfectly well once I replaced onPopped
with onBackNavigated
I was wondering that too, but I want to believe that Xamarin.Forms triggers events sequentially 🙃
Fixes #947
This PR does a couple things:
onPopped
,onPushed
andonPoppedToRoot
as obsoleteonBackNavigated
The main issue with #947 was all NavigationPage events were both triggered by user actions and programmatic changes made by Fabulous. There was no way to differentiate who was triggering the events to be able to react only to the user's actions.
To prevent this, I created
CustomNavigationPage
which has an internal counter for the number of times Fabulous pops pages. This counter is used to suppress thePopped
events triggered programmatically by Fabulous. If the pop has been done by the user, thenBackNavigated
is triggered instead.