fix-next(modal) fix crash when closing modal dialog with root tabview inside (#5446)

This commit is contained in:
Manol Donev
2018-02-23 16:46:49 +02:00
committed by GitHub
parent 9423ae40fa
commit 4898c33a04
4 changed files with 68 additions and 12 deletions

View File

@@ -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 {

View File

@@ -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