fix: Add old names to platform for compatibility

This commit is contained in:
Nathanael Anderson
2020-12-05 02:22:01 -06:00
parent bd7c686aaf
commit cba47c239d
2 changed files with 13 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;