diff options
Diffstat (limited to 'kvision-modules/kvision-cordova/src/main')
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 } /** |