reactiveui/Sextant

[BUG] navigationService.PopPage does not trigger WhenNavigatedTo

thor089 opened this issue · 5 comments

Describe the bug
When navigating to a view model with

var navigationService = Locator.Current.GetService<IParameterViewStackService>(); return navigationService .PushPage(new TimeTrackingDetailPageViewModel(), new NavigationParameter { { "parameter", "test" } });

WhenNavigatedTo is triggered and you can read the parameter.

navigationService .PopPage(new NavigationParameter { { "parameter", "back" } });

Does not trigger WhenNavigatedTo and you are not able to retrieve the parameter

Steps To Reproduce

  1. Take the "Navigation.Parameters" sample - https://github.com/reactiveui/ReactiveUI.Samples/tree/master/xamarin-forms/Navigation.Parameters

  2. Extend the ReceivedViewModel to have a command which calls the "PopPage(...)"

  3. Override WhenNavigatingTo in PassViewModel

Expected behavior
WhenNavigatingTo should always be called when navigating to a view model

Environment

  • OS: Android: Emulator (Oreo); iOS Simulator iPhone 11 - 13.3

Hey @thor089 👋,

Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially.

https://opencollective.com/reactiveui

PS.: We offer priority support for all financial contributors. Don't forget to add priority label once you start contributing 😄

An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms!

@thor089 Thanks for reporting this. I will probably work a fix in this weekend.

Priority
@RLittlesII that would be gorgeous. If you need someone to test - just let me know.

@RLittlesII: Thank you very much!
I verified it with iOS and Android and it is working now.
Looking forward to the next release.

Once it gets merged in there should be a release early next week.