-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 syncing modal stack when the window is created/recreated #13025
Conversation
d8e5af8
to
7548317
Compare
nextPage?.SendNavigatedTo(new NavigatedToEventArgs(modal)); | ||
|
||
return result; | ||
return _owner.ModalNavigationManager.PopModalAsync(animated); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just need a small comment about the try {} trick.
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.cs
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
|
||
namespace Microsoft.Maui.Platform | ||
{ | ||
internal class ModalWrapper : UIViewController |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this rather be an interface if it does not do anything specific?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
Description of Change
Fix
ModalNavigationManager
so 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