|
@@ -9,15 +9,10 @@ export interface NavigationConstants {
|
9
|
9
|
|
10
|
10
|
export class Constants {
|
11
|
11
|
static async get(): Promise<NavigationConstants> {
|
12
|
|
- if (!this.instance) {
|
13
|
|
- const constants: NavigationConstants = await NativeModules.RNNBridgeModule.getConstants();
|
14
|
|
- this.instance = new Constants(constants);
|
15
|
|
- }
|
16
|
|
- return this.instance;
|
|
12
|
+ const constants: NavigationConstants = await NativeModules.RNNBridgeModule.getConstants();
|
|
13
|
+ return new Constants(constants);
|
17
|
14
|
}
|
18
|
15
|
|
19
|
|
- private static instance: Constants;
|
20
|
|
-
|
21
|
16
|
public readonly statusBarHeight: number;
|
22
|
17
|
public readonly backButtonId: string;
|
23
|
18
|
public readonly topBarHeight: number;
|