esoftplay 0.0.109-c → 0.0.109-d
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.
- package/global.ts +8 -3
- package/package.json +1 -1
package/global.ts
CHANGED
|
@@ -48,7 +48,10 @@ const n = () => {
|
|
|
48
48
|
|
|
49
49
|
// rehidryte instant
|
|
50
50
|
if (o?.persistKey) {
|
|
51
|
-
rehidryte(o.persistKey, (p) => {
|
|
51
|
+
rehidryte(o.persistKey, (p) => {
|
|
52
|
+
if (typeof p == 'string') set(JSON.parse(p))
|
|
53
|
+
|
|
54
|
+
})
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
/* register to userData to automatically reset state and persist */
|
|
@@ -150,9 +153,11 @@ const n = () => {
|
|
|
150
153
|
debounce(() => {
|
|
151
154
|
AsyncStorage.multiGet(Object.keys(persistKeys), (e, v) => {
|
|
152
155
|
if (v && !e) {
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
v.forEach((iv, i) => {
|
|
157
|
+
persistKeys[iv[0]]?.(iv[1])
|
|
155
158
|
})
|
|
159
|
+
} else {
|
|
160
|
+
|
|
156
161
|
}
|
|
157
162
|
})
|
|
158
163
|
}, 30)
|