aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-cordova/src/main
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-06-20 22:22:19 +0200
committerRobert Jaros <rjaros@finn.pl>2019-06-20 22:22:19 +0200
commit5082d9ec1507ebeca74b30e4f46a034ed688b46d (patch)
tree7d25dd4f7896aa709eb8f8aaf9d41bb2ec080a0d /kvision-modules/kvision-cordova/src/main
parent35b3961a8280db4d8974a9c547cbabc06f02e364 (diff)
downloadkvision-5082d9ec1507ebeca74b30e4f46a034ed688b46d.tar.gz
kvision-5082d9ec1507ebeca74b30e4f46a034ed688b46d.tar.bz2
kvision-5082d9ec1507ebeca74b30e4f46a034ed688b46d.zip
Change result builder.
Diffstat (limited to 'kvision-modules/kvision-cordova/src/main')
-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 {