mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix: Add old names to platform for compatibility
This commit is contained in:
@@ -57,6 +57,10 @@ export class Screen {
|
||||
static mainScreen = new MainScreen();
|
||||
}
|
||||
|
||||
export class screen {
|
||||
static mainScreen = Screen.mainScreen;
|
||||
}
|
||||
|
||||
class DeviceRef {
|
||||
private _manufacturer: string;
|
||||
private _model: string;
|
||||
@@ -144,6 +148,7 @@ class DeviceRef {
|
||||
}
|
||||
|
||||
export const Device = new DeviceRef();
|
||||
export const device = Device;
|
||||
|
||||
export const isAndroid = global.isAndroid;
|
||||
export const isIOS = global.isIOS;
|
||||
|
||||
@@ -119,9 +119,17 @@ class MainScreen {
|
||||
|
||||
export const Device = new DeviceRef();
|
||||
|
||||
// This retains compatibility with NS6
|
||||
export const device = Device;
|
||||
|
||||
export class Screen {
|
||||
static mainScreen = new MainScreen();
|
||||
}
|
||||
|
||||
// This retains compatibility with NS6
|
||||
export class screen {
|
||||
static mainScreen = Screen.mainScreen;
|
||||
}
|
||||
|
||||
export const isAndroid = global.isAndroid;
|
||||
export const isIOS = global.isIOS;
|
||||
|
||||
Reference in New Issue
Block a user