-
Notifications
You must be signed in to change notification settings - Fork 338
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
Remove Bindings on Popup Close #1614
Conversation
Hey @cat0363, thanks for PR... For me, this looks more like a workaround than an actual fix. We dispose of the PlatformView when the |
@pictos , Thank you for your comment. |
The root cause of this problem is that the Binding is not released after the Popup is closed. Revert the modifications you made previously and make the following changes. [src\CommunityToolkit.Maui\Views\Popup\Popup.shared.cs]
Below is the verification video. Android.Emulator.-.pixel_2_-_api_30_5554.2024-01-19.11-42-36.mp4You can see that it doesn't crash even after changing the theme. |
In this PR, we will correct it so that SetColor of a Popup that has already been destroyed is not called.
Description of Change
If the SetColor method is called after closing the Popup, an exception will occur at the following location.
[src\CommunityToolkit.Maui.Core\Views\Popup\PopupExtensions.android.cs]
Add a guard condition to the call to the SetColor method.
[src\CommunityToolkit.Maui.Core\Handlers\Popup\PopUpHandler.android.cs]
Similarly, add guard conditions to calls to the SetAnchor and SetSize methods.
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
Below is the verification video.
Android.Emulator.-.pixel_2_-_api_30_5554.2023-12-20.15-32-08.mp4
Even if I change the AppTheme, I can see that it is working as intended without any crashes.