mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
refactor: platform specific logic from view common
This commit is contained in:
@ -350,11 +350,7 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
if (isAndroid || (parent.viewController && parent.viewController.presentedViewController)) {
|
||||
that._hideNativeModalView(parent, whenClosedCallback);
|
||||
} else {
|
||||
whenClosedCallback();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -452,6 +452,12 @@ export class View extends ViewCommon {
|
||||
return;
|
||||
}
|
||||
|
||||
// modal view has already been closed by UI, probably as a popover
|
||||
if (!parent.viewController.presentedViewController) {
|
||||
whenClosedCallback();
|
||||
return;
|
||||
}
|
||||
|
||||
const parentController = parent.viewController;
|
||||
const animated = (<any>this.viewController).animated;
|
||||
|
||||
|
Reference in New Issue
Block a user