Skip to content

Commit

Permalink
Merge pull request #14 from icerockdev/develop
Browse files Browse the repository at this point in the history
Release 0.4.3
  • Loading branch information
Alex009 authored Apr 2, 2020
2 parents 977193f + c359e71 commit 2c8f25a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ TODO
- 0.4.0
- 0.4.1
- 0.4.2
- 0.4.3

## Installation
root build.gradle
Expand All @@ -46,7 +47,7 @@ allprojects {
project build.gradle
```groovy
dependencies {
commonMainApi("dev.icerock.moko:media:0.4.2")
commonMainApi("dev.icerock.moko:media:0.4.3")
}
```

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object Versions {
const val minSdk = 16
}

const val kotlin = "1.3.70"
const val kotlin = "1.3.71"

object Plugins {
const val kotlin = Versions.kotlin
Expand All @@ -21,7 +21,7 @@ object Versions {
object MultiPlatform {
const val coroutines = "1.3.4"
const val mokoPermissions = "0.5.0"
const val mokoMedia = "0.4.2"
const val mokoMedia = "0.4.3"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import platform.UIKit.UIViewController
import platform.darwin.NSObject
import kotlin.coroutines.Continuation
import kotlin.coroutines.suspendCoroutine
import kotlin.random.Random

actual class MediaPickerController(
val permissionsController: PermissionsController,
Expand Down Expand Up @@ -130,14 +131,14 @@ actual class MediaPickerController(
)
continuation.resumeWith(Result.success(media))
} else {
if (image == null || mediaUrl == null) {
if (image == null) {
continuation.resumeWith(Result.failure(NoAccessToFileException("info: $info"))) // TODO write some info
return
}

val media = Media(
name = mediaUrl.relativeString,
path = mediaUrl.path.orEmpty(),
name = mediaUrl?.relativeString ?: Random.nextLong().toString(),
path = mediaUrl?.path.orEmpty(),
preview = Bitmap(image),
type = type
)
Expand Down

0 comments on commit 2c8f25a

Please sign in to comment.