mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix-next(modal) fix crash when closing modal dialog with root tabview inside (#5446)
This commit is contained in:
@@ -175,15 +175,7 @@ function initializeDialogFragment() {
|
||||
|
||||
this._shownCallback();
|
||||
}
|
||||
|
||||
public onStop(): void {
|
||||
super.onStop();
|
||||
const owner = this.owner;
|
||||
if (owner.isLoaded) {
|
||||
owner.callUnloaded();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public onDismiss(dialog: android.content.IDialogInterface): void {
|
||||
super.onDismiss(dialog);
|
||||
const manager = this.getFragmentManager();
|
||||
@@ -191,6 +183,11 @@ function initializeDialogFragment() {
|
||||
removeModal(this.owner._domId);
|
||||
this._dismissCallback();
|
||||
}
|
||||
|
||||
const owner = this.owner;
|
||||
if (owner.isLoaded) {
|
||||
owner.callUnloaded();
|
||||
}
|
||||
}
|
||||
|
||||
public onDestroy(): void {
|
||||
|
||||
@@ -461,6 +461,10 @@ export class TabView extends TabViewBase {
|
||||
}
|
||||
|
||||
private shouldUpdateAdapter(items: Array<TabViewItemDefinition>) {
|
||||
if (!this._pagerAdapter) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const currentPagerAdapterItems = (<any>this._pagerAdapter).items;
|
||||
|
||||
// if both values are null, should not update
|
||||
|
||||
Reference in New Issue
Block a user