mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: bundle workflow support (#7337)
This commit is contained in:
committed by
Vasil Chimev
parent
5f9eabdf17
commit
ecd9fc3e9d
@@ -126,8 +126,8 @@ export interface AndroidApplication {
|
||||
}
|
||||
|
||||
const androidApp = new AndroidApplication();
|
||||
// use the exports object instead of 'export var' due to global namespace collision
|
||||
exports.android = androidApp;
|
||||
export { androidApp as android };
|
||||
|
||||
setApplication(androidApp);
|
||||
|
||||
let mainEntry: NavigationEntry;
|
||||
@@ -253,14 +253,14 @@ function initLifecycleCallbacks() {
|
||||
const subscribeForGlobalLayout = profile("subscribeForGlobalLayout", function (activity: androidx.appcompat.app.AppCompatActivity) {
|
||||
const rootView = activity.getWindow().getDecorView().getRootView();
|
||||
// store the listener not to trigger GC collection before collecting the method
|
||||
this.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
|
||||
global.onGlobalLayoutListener = new android.view.ViewTreeObserver.OnGlobalLayoutListener({
|
||||
onGlobalLayout() {
|
||||
notify({ eventName: displayedEvent, object: androidApp, activity });
|
||||
let viewTreeObserver = rootView.getViewTreeObserver();
|
||||
viewTreeObserver.removeOnGlobalLayoutListener(this.onGlobalLayoutListener);
|
||||
viewTreeObserver.removeOnGlobalLayoutListener(global.onGlobalLayoutListener);
|
||||
}
|
||||
});
|
||||
rootView.getViewTreeObserver().addOnGlobalLayoutListener(this.onGlobalLayoutListener);
|
||||
rootView.getViewTreeObserver().addOnGlobalLayoutListener(global.onGlobalLayoutListener);
|
||||
});
|
||||
|
||||
const lifecycleCallbacks = new android.app.Application.ActivityLifecycleCallbacks({
|
||||
|
||||
@@ -270,7 +270,8 @@ class IOSApplication implements IOSApplicationDefinition {
|
||||
}
|
||||
|
||||
const iosApp = new IOSApplication();
|
||||
exports.ios = iosApp;
|
||||
|
||||
export { iosApp as ios };
|
||||
setApplication(iosApp);
|
||||
|
||||
// attach on global, so it can be overwritten in NativeScript Angular
|
||||
|
||||
Reference in New Issue
Block a user