mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
refactor: improved core barrel exports and Application class (#10286)
BREAKING CHANGES:
`Application.orientation` is no longer a function.
Migration: Remove `()` from the `Application.orientation()` call:
```diff
import { Application } from "@nativescript/core";
-console.log(Application.orientation());
+console.log(Application.orientation);
```
`Application.systemAppearance` is no longer a function.
Migration: Remove `()` from the `Application.systemAppearance()` call:
```diff
import { Application } from "@nativescript/core";
-console.log(Application.systemAppearance());
+console.log(Application.systemAppearance);
```
This commit is contained in:
committed by
Nathan Walker
parent
963d0243de
commit
f64355ba7a
@@ -6,7 +6,7 @@ import * as httpModule from '../http';
|
||||
// Types.
|
||||
import { path as fsPath, knownFolders } from '../file-system';
|
||||
import { isFileOrResourcePath, RESOURCE_PREFIX, layout } from '../utils';
|
||||
import { getNativeApplication } from '../application';
|
||||
import { Application } from '../application';
|
||||
import { Font } from '../ui/styling/font';
|
||||
import { Color } from '../color';
|
||||
|
||||
@@ -26,7 +26,7 @@ let resources: android.content.res.Resources;
|
||||
|
||||
function getApplication() {
|
||||
if (!application) {
|
||||
application = <android.app.Application>getNativeApplication();
|
||||
application = Application.android.getNativeApplication();
|
||||
}
|
||||
|
||||
return application;
|
||||
|
||||
Reference in New Issue
Block a user