aboutsummaryrefslogtreecommitdiff
path: root/kvision-modules/kvision-cordova/src/main
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2019-10-25 20:46:42 +0200
committerRobert Jaros <rjaros@finn.pl>2019-10-25 20:46:42 +0200
commitc78775aa2aaf76f9fa1404ff32a10fb8227f380e (patch)
treea6991e1f520e1ce54679b2194a756203a645f99e /kvision-modules/kvision-cordova/src/main
parenta990385dd3f2dbac4807b7a9498271efb3519c0d (diff)
downloadkvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.tar.gz
kvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.tar.bz2
kvision-c78775aa2aaf76f9fa1404ff32a10fb8227f380e.zip
Style fixes
Diffstat (limited to 'kvision-modules/kvision-cordova/src/main')
-rw-r--r--kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Battery.kt2
-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/MediaCapture.kt2
-rw-r--r--kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Screen.kt2
4 files changed, 5 insertions, 5 deletions
diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Battery.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Battery.kt
index 656a519a..8078353b 100644
--- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Battery.kt
+++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Battery.kt
@@ -65,7 +65,7 @@ object Battery {
*/
suspend fun getStatus(): BatteryStatus {
return suspendCoroutine { continuation ->
- addStatusListener(Battery.BatteryEvent.BATTERY_STATUS) { status ->
+ addStatusListener(BatteryEvent.BATTERY_STATUS) { status ->
continuation.resume(status)
}
}
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 944042fa..5d24ac9f 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
@@ -169,8 +169,8 @@ object File {
): Result<FileSystem, FileException> {
return suspendCoroutine { continuation ->
val type = when (fileSystemType) {
- File.FileSystemType.TEMPORARY -> LocalFileSystem.TEMPORARY
- File.FileSystemType.PERSISTENT -> LocalFileSystem.PERSISTENT
+ FileSystemType.TEMPORARY -> LocalFileSystem.TEMPORARY
+ FileSystemType.PERSISTENT -> LocalFileSystem.PERSISTENT
}
addDeviceReadyListener {
window.asDynamic().requestFileSystem(type, size, { fs ->
diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt
index fda81da7..be291620 100644
--- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt
+++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/MediaCapture.kt
@@ -84,7 +84,7 @@ suspend fun MediaFile.getFormatData(): MediaFileData? {
/**
* Exception class for media capture errors.
*/
-class CaptureException(val code: MediaCapture.CaptureErrorCode) : Exception("Capture exception: $code")
+class CaptureException(code: MediaCapture.CaptureErrorCode) : Exception("Capture exception: $code")
/**
* Main media capture object.
diff --git a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Screen.kt b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Screen.kt
index a33b2453..2ad009f9 100644
--- a/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Screen.kt
+++ b/kvision-modules/kvision-cordova/src/main/kotlin/pl/treksoft/kvision/cordova/Screen.kt
@@ -65,7 +65,7 @@ object Screen {
return Orientation.values().find {
@Suppress("UnsafeCastFromDynamic")
it.type == type
- } ?: Screen.Orientation.ANY
+ } ?: Orientation.ANY
}
/**