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)mainat 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.