| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -195,8 +195,17 @@ function initializeDialogFragment() { | |||
| 195 | 195 | public onDestroy(): void { | |
| 196 | 196 | super.onDestroy(); | |
| 197 | 197 | const owner = this.owner; | |
| 198 | - owner._isAddedToNativeVisualTree = false; | ||
| 199 | - owner._tearDownUI(true); | ||
| 198 | + | ||
| 199 | + if (owner) { | ||
| 200 | + // Android calls onDestroy before onDismiss. | ||
| 201 | + // Make sure we unload first and then call _tearDownUI. | ||
| 202 | + if (owner.isLoaded) { | ||
| 203 | + owner.callUnloaded(); | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + owner._isAddedToNativeVisualTree = false; | ||
| 207 | + owner._tearDownUI(true); | ||
| 208 | + } | ||
| 200 | 209 | } | |
| 201 | 210 | } | |
| 202 | 211 | ||
@@ -386,7 +395,7 @@ export class View extends ViewCommon { | |||
| 386 | 395 | if (!this.nativeViewProtected || !this.hasGestureObservers()) { | |
| 387 | 396 | return; | |
| 388 | 397 | } | |
| 389 | - | ||
| 398 | + | ||
| 390 | 399 | // do not set noop listener that handles the event (disabled listener) if IsUserInteractionEnabled is | |
| 391 | 400 | // false as we might need the ability for the event to pass through to a parent view | |
| 392 | 401 | initializeTouchListener(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments