Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix For Maui Navigation cast Type A to Type B #3581

Merged
merged 2 commits into from Jul 11, 2023

Conversation

ChrisPulman
Copy link
Member

What kind of change does this PR introduce?

Fix for #3563

What is the current behaviour?

After clearing the Navigation stack, when Navigating using PopToRoot or NavigateBack an exception occurs in InvalidateCurrentViewModel trying to cast Type A to Type B

What is the new behaviour?

Handlers are added to synchronise the navigation stacks and ignore incompatible viewmodels

What might this PR break?

None expected as this issue must have been an underlying issue and would have crashed the end application

Please check if the PR fulfils these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.08 ⚠️

Comparison is base (6d309b2) 64.07% compared to head (cc6d269) 64.00%.

❗ Current head cc6d269 differs from pull request most recent head 01023f6. Consider uploading reports for the commit 01023f6 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3581      +/-   ##
==========================================
- Coverage   64.07%   64.00%   -0.08%     
==========================================
  Files         157      157              
  Lines        5762     5750      -12     
==========================================
- Hits         3692     3680      -12     
  Misses       2070     2070              
Impacted Files Coverage Δ
...activeUI.Wpf/Common/AutoDataTemplateBindingHook.cs 92.85% <ø> (ø)
...eUI.Wpf/Common/BooleanToVisibilityTypeConverter.cs 70.58% <ø> (ø)
src/ReactiveUI.Wpf/Common/PlatformOperations.cs 0.00% <ø> (ø)
src/ReactiveUI.Wpf/Common/ReactivePage.cs 0.00% <ø> (ø)
src/ReactiveUI.Wpf/Common/ReactiveUserControl.cs 90.90% <ø> (ø)
src/ReactiveUI.Wpf/Common/RoutedViewHost.cs 86.53% <ø> (ø)
src/ReactiveUI.Wpf/Common/ViewModelViewHost.cs 84.48% <ø> (ø)
.../ReactiveUI.Wpf/Rx/Concurrency/ControlScheduler.cs 0.00% <ø> (ø)
...activeUI.Wpf/Rx/Concurrency/DispatcherScheduler.cs 0.00% <ø> (ø)
src/ReactiveUI.Wpf/Rx/Linq/ControlObservable.cs 0.00% <ø> (ø)
... and 1 more

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ChrisPulman ChrisPulman enabled auto-merge (squash) July 11, 2023 05:50
@ChrisPulman ChrisPulman merged commit c074228 into main Jul 11, 2023
1 check passed
@ChrisPulman ChrisPulman deleted the CP_FixForMauiNavigateTypeACastTypeB branch July 11, 2023 07:00
@github-actions
Copy link

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants