aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-cordova
diff options
context:
space:
mode:
Diffstat (limited to 'kvision-modules/kvision-cordova')
-rw-r--r--kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/File.kt4
-rw-r--r--kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt8
2 files changed, 6 insertions, 6 deletions
diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/File.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/File.kt
index df176e84..6e7ba732 100644
--- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/File.kt
+++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/File.kt
@@ -106,7 +106,7 @@ object File {
return suspendCoroutine { continuation ->
addDeviceReadyListener {
window.asDynamic().resolveLocalFileSystemURL(url, { entry ->
- continuation.resume(Result.Success(entry))
+ continuation.resume(Result.success(entry))
}, { error ->
continuation.resume(Result.error(FileException(error.code)))
})
@@ -173,7 +173,7 @@ object File {
}
addDeviceReadyListener {
window.asDynamic().requestFileSystem(type, size, { fs ->
- continuation.resume(Result.Success(fs))
+ continuation.resume(Result.success(fs))
}, { error ->
continuation.resume(Result.error(FileException(error.code)))
})
diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt
index 9f4d9cfe..4087a4f2 100644
--- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt
+++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Geolocation.kt
@@ -90,7 +90,7 @@ object Geolocation {
return suspendCoroutine { continuation ->
addDeviceReadyListener {
window.navigator.asDynamic().geolocation.getCurrentPosition({ position: Position ->
- continuation.resume(Result.Success(position))
+ continuation.resume(Result.success(position))
}, { error ->
continuation.resume(Result.error(GeolocationException(codeToEnum(error.code), error.message)))
}, obj {
@@ -120,7 +120,7 @@ object Geolocation {
return suspendCoroutine { continuation ->
addDeviceReadyListener {
val watchId = window.navigator.asDynamic().geolocation.watchPosition({ position: Position ->
- resultCallback(Result.Success(position))
+ resultCallback(Result.success(position))
}, { error ->
resultCallback(Result.error(GeolocationException(codeToEnum(error.code), error.message)))
}, obj {
@@ -183,7 +183,7 @@ object Locationservices {
addDeviceReadyListener {
window.asDynamic()
.cordova.plugins.locationServices.geolocation.getCurrentPosition({ position: Position ->
- continuation.resume(Result.Success(position))
+ continuation.resume(Result.success(position))
}, { error ->
continuation.resume(Result.error(GeolocationException(codeToEnum(error.code), error.message)))
}, obj {
@@ -224,7 +224,7 @@ object Locationservices {
val watchId =
window.asDynamic()
.cordova.plugins.locationServices.geolocation.watchPosition({ position: Position ->
- resultCallback(Result.Success(position))
+ resultCallback(Result.success(position))
}, { error ->
resultCallback(Result.error(GeolocationException(codeToEnum(error.code), error.message)))
}, obj {