refactor(core): zero circulars + esm ready (#10770)

This commit is contained in:
Nathan Walker
2025-09-18 17:03:23 -07:00
committed by GitHub
parent 1e54baf198
commit c2ff8c1ae7
306 changed files with 9136 additions and 9889 deletions

View File

@ -1,10 +1,10 @@
import { Application } from '../../application';
import { getNativeApp } from '../../application/helpers-common';
class MainScreen {
private _metrics: android.util.DisplayMetrics;
private initMetrics(): void {
const nativeApp = Application.android.getNativeApplication();
const nativeApp = getNativeApp() as android.app.Application;
nativeApp.getSystemService(android.content.Context.WINDOW_SERVICE).getDefaultDisplay().getRealMetrics(this._metrics);
}

View File

@ -1,4 +1,4 @@
import { ios } from '../../utils';
import { getWindow } from '../../utils/native-helper';
class MainScreen {
private _screen: UIScreen;
@ -6,7 +6,7 @@ class MainScreen {
private get screen(): UIScreen {
if (!this._screen) {
// NOTE: may not want to cache this value with SwiftUI app lifecycle based apps (using NativeScriptViewFactory) given the potential of multiple scenes
const window = ios.getWindow();
const window = getWindow() as UIWindow;
this._screen = window ? window.screen : UIScreen.mainScreen;
}