mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
perf: Improved live-sync functionality for RootLayout (#9836)
This commit is contained in:
committed by
GitHub
parent
11eb705433
commit
3537858b6d
@@ -194,12 +194,6 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition {
|
||||
|
||||
let handled = false;
|
||||
|
||||
const rootLayout = global.rootLayout;
|
||||
if (rootLayout != null && rootLayout.topmost() != null) {
|
||||
rootLayout.closeAll();
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if (this._closeAllModalViewsInternal()) {
|
||||
handled = true;
|
||||
}
|
||||
|
||||
@@ -25,6 +25,21 @@ export class RootLayoutBase extends GridLayout {
|
||||
super.onLoaded();
|
||||
}
|
||||
|
||||
public _onLivesync(context?: ModuleContext): boolean {
|
||||
let handled = false;
|
||||
|
||||
if (this.popupViews.length > 0) {
|
||||
this.closeAll();
|
||||
handled = true;
|
||||
}
|
||||
|
||||
if (super._onLivesync(context)) {
|
||||
handled = true;
|
||||
}
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
||||
// ability to add any view instance to composite views like layers
|
||||
open(view: View, options: RootLayoutOptions = {}): Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
Reference in New Issue
Block a user