@onekeyfe/react-native-device-utils 6.7.0-alpha.386 → 6.7.0-alpha.389
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28,10 +28,10 @@ final class DualScreenDetector {
|
|
|
28
28
|
private init() {
|
|
29
29
|
let modelIdentifier = DualScreenDetector.modelIdentifier()
|
|
30
30
|
let isKnownModel = DualScreenDetector.foldableModelIdentifiers.contains(modelIdentifier)
|
|
31
|
-
let isCached = UserDefaults.standard.
|
|
31
|
+
let isCached = UserDefaults.standard.string(forKey: DualScreenDetector.cacheKey) == modelIdentifier
|
|
32
32
|
isDualScreen = isKnownModel || isCached
|
|
33
33
|
if isKnownModel && !isCached {
|
|
34
|
-
UserDefaults.standard.set(
|
|
34
|
+
UserDefaults.standard.set(modelIdentifier, forKey: DualScreenDetector.cacheKey)
|
|
35
35
|
}
|
|
36
36
|
OneKeyLog.info(
|
|
37
37
|
"DeviceUtils",
|
|
@@ -135,7 +135,7 @@ final class DualScreenDetector {
|
|
|
135
135
|
lock.unlock()
|
|
136
136
|
|
|
137
137
|
if isNewlyDetected {
|
|
138
|
-
UserDefaults.standard.set(
|
|
138
|
+
UserDefaults.standard.set(DualScreenDetector.modelIdentifier(), forKey: DualScreenDetector.cacheKey)
|
|
139
139
|
OneKeyLog.info(
|
|
140
140
|
"DeviceUtils",
|
|
141
141
|
"Dual screen detected by hinge: model=\(DualScreenDetector.modelIdentifier())"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-device-utils",
|
|
3
|
-
"version": "6.7.0-alpha.
|
|
3
|
+
"version": "6.7.0-alpha.389",
|
|
4
4
|
"description": "Native device, launch, system appearance and boot recovery utilities for OneKey",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|