Commit 14821ae
authored
Fix MAUI RoutedViewHost Navigation (#3692)
<!-- Please be sure to read the
[Contribute](https://github.com/reactiveui/reactiveui#contribute)
section of the README -->
**What kind of change does this PR introduce?**
<!-- Bug fix, feature, docs update, ... -->
Bug fix
**What is the current behavior?**
<!-- You can also link to an open issue here. -->
#3640 When 'RoutedViewHost' is activated, it calls
'SyncNavigationStacksAsync', which pushes a page for the current
ViewModel. However, the Router.Navigate subscription is also triggered,
creating and pushing a new page for the same ViewModel.
**What is the new behavior?**
<!-- If this is a feature change -->
To fix this, I filtered Navigate to execute the action only when the
NavigationStacks have different sizes, since it seems that is what the
Navigate subscription was supposed to do anyway. I think this makes the
subsequent call to SyncNavigationStacksAsync() useless. Should I remove
it?
**What might this PR break?**
RoutedViewHost Navigate subscription.
**Please check if the PR fulfills these requirements**
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
**Other information**:
I was informed that there were no tests for MAUI and no documentation
seemed to be present either.1 parent f533f16 commit 14821ae
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
0 commit comments