orbis1-sdk-rn 0.2.5 → 0.2.7
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.
|
@@ -358,7 +358,6 @@ class RgbModule(reactContext: ReactApplicationContext) :
|
|
|
358
358
|
if (status) {
|
|
359
359
|
val map = Arguments.createMap()
|
|
360
360
|
map.putBoolean("status", status)
|
|
361
|
-
map.putString("error", error)
|
|
362
361
|
promise.resolve(map)
|
|
363
362
|
} else {
|
|
364
363
|
deleteRuntimeLockFile(masterFingerprint)
|
|
@@ -367,7 +366,9 @@ class RgbModule(reactContext: ReactApplicationContext) :
|
|
|
367
366
|
val (retryStatus, retryError) = retryResult
|
|
368
367
|
val map = Arguments.createMap()
|
|
369
368
|
map.putBoolean("status", retryStatus)
|
|
370
|
-
|
|
369
|
+
if (!retryStatus) {
|
|
370
|
+
map.putString("error", retryError)
|
|
371
|
+
}
|
|
371
372
|
promise.resolve(map)
|
|
372
373
|
}
|
|
373
374
|
}
|
|
@@ -384,7 +385,13 @@ class RgbModule(reactContext: ReactApplicationContext) :
|
|
|
384
385
|
|
|
385
386
|
fun deleteRuntimeLockFile(masterFingerprint: String) {
|
|
386
387
|
try {
|
|
387
|
-
|
|
388
|
+
val rgbDir = AppConstants.rgbDir
|
|
389
|
+
if (rgbDir == null) {
|
|
390
|
+
Log.i("RGB", "RGB directory is not initialized. Skipping runtime lock deletion.")
|
|
391
|
+
return
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
val runtimeLockPath = rgbDir
|
|
388
395
|
.resolve(masterFingerprint)
|
|
389
396
|
.resolve("rgb_runtime.lock")
|
|
390
397
|
if (!runtimeLockPath.exists()) {
|
package/ios/Rgb.swift
CHANGED
|
@@ -383,11 +383,10 @@ public class RgbSwiftHelper: NSObject {
|
|
|
383
383
|
}
|
|
384
384
|
|
|
385
385
|
if let result = runOnline() {
|
|
386
|
-
let (status,
|
|
386
|
+
let (status, _) = result
|
|
387
387
|
if status {
|
|
388
388
|
return [
|
|
389
|
-
"status": NSNumber(value: status)
|
|
390
|
-
"error": errorMessage
|
|
389
|
+
"status": NSNumber(value: status)
|
|
391
390
|
] as NSDictionary
|
|
392
391
|
}
|
|
393
392
|
|
|
@@ -395,6 +394,11 @@ public class RgbSwiftHelper: NSObject {
|
|
|
395
394
|
|
|
396
395
|
if let retryResult = runOnline() {
|
|
397
396
|
let (retryStatus, retryError) = retryResult
|
|
397
|
+
if retryStatus {
|
|
398
|
+
return [
|
|
399
|
+
"status": NSNumber(value: retryStatus)
|
|
400
|
+
] as NSDictionary
|
|
401
|
+
}
|
|
398
402
|
return [
|
|
399
403
|
"status": NSNumber(value: retryStatus),
|
|
400
404
|
"error": retryError
|
package/package.json
CHANGED