revert: fix(android): nested dialog/fragment handling (#9495)

This reverts commit 4c547bb00c554d35408c7d0c44ef46e237819132.
This commit is contained in:
Nathan Walker
2021-08-11 10:24:03 -07:00
parent 3e98d1e934
commit 3aff057b99
7 changed files with 4 additions and 78 deletions

View File

@ -345,9 +345,6 @@ export class View extends ViewCommon {
}
public _getFragmentManager(): androidx.fragment.app.FragmentManager {
if ((<any>global)._dialogFragment) {
return (<any>global)._dialogFragment.getChildFragmentManager();
}
let manager = this._manager;
if (!manager) {
let view: View = this;
@ -693,19 +690,20 @@ export class View extends ViewCommon {
};
saveModal(dialogOptions);
this._dialogFragment = df;
(<any>global)._dialogFragment = df;
this._raiseShowingModallyEvent();
this._dialogFragment.show(parent._getRootFragmentManager(), this._domId.toString());
}
protected _hideNativeModalView(parent: View, whenClosedCallback: () => void) {
const manager = this._dialogFragment.getParentFragmentManager();
const manager = this._dialogFragment.getFragmentManager();
if (manager) {
this._dialogFragment.dismissAllowingStateLoss();
}
this._dialogFragment = null;
(<any>global)._dialogFragment = null;
whenClosedCallback();
}