Fix syncing modal stack when the window is created/recreated#13025
Merged
Fix syncing modal stack when the window is created/recreated#13025
Conversation
d8e5af8 to
7548317
Compare
PureWeen
commented
Feb 6, 2023
| nextPage?.SendNavigatedTo(new NavigatedToEventArgs(modal)); | ||
|
|
||
| return result; | ||
| return _owner.ModalNavigationManager.PopModalAsync(animated); |
Member
Author
There was a problem hiding this comment.
I moved all of this code into ModalNavigationManager
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Android.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
mandel-macaque
suggested changes
Feb 8, 2023
Contributor
mandel-macaque
left a comment
There was a problem hiding this comment.
Some minor comments.
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.iOS.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.iOS.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.iOS.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.iOS.cs
Outdated
Show resolved
Hide resolved
mandel-macaque
approved these changes
Feb 8, 2023
Contributor
mandel-macaque
left a comment
There was a problem hiding this comment.
Just need a small comment about the try {} trick.
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
mattleibow
reviewed
Mar 14, 2023
|
|
||
| namespace Microsoft.Maui.Platform | ||
| { | ||
| internal class ModalWrapper : UIViewController |
Member
There was a problem hiding this comment.
Should this rather be an interface if it does not do anything specific?
Member
Author
There was a problem hiding this comment.
Perhaps eventually?
At some point we'll move modals into core and those APIs will all get designed. There's not really a larger use case here yet for an interface so I don't think we need to make that leap yet.
Contributor
|
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
rmarinho
reviewed
Mar 15, 2023
rmarinho
approved these changes
Mar 16, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Fix
ModalNavigationManagerso it will reprocess the current Modal stack when the root window handler changes. Currently we aren't processing any modal pages pushed before the app has loaded and we don't reprocess the modal stack if the window is destroyed and recreated (Android).This PR adds code to detect when we need to reprocess the modal stack based on the root view changing or being destroyed
Breaking Changes
Issues Fixed
Fixes #8157