Skip to content

Commit

Permalink
icerockdev#34 Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Nesterov committed May 7, 2024
1 parent 6ae0752 commit 219c489
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ val viewModel = getViewModel {
}

viewModel.mediaController.bind(
lifecycle,
supportFragmentManager
activity
) // permissioncController bind automatically
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import androidx.activity.result.PickVisualMediaRequest
import androidx.activity.result.contract.ActivityResultContracts
import dev.icerock.moko.media.Media
import dev.icerock.moko.media.MediaFactory
import kotlinx.coroutines.flow.MutableStateFlow

internal class MediaPickerDelegate :
PickerDelegate<MediaPickerDelegate.CallbackData, PickVisualMediaRequest>() {
Expand Down Expand Up @@ -39,9 +38,6 @@ internal class MediaPickerDelegate :
callback.invoke(result)
}

private val mediaPickerLauncherHolder =
MutableStateFlow<ActivityResultLauncher<PickVisualMediaRequest>?>(null)

fun pick(callback: (Result<Media>) -> Unit) {
this.callback?.let {
it.callback.invoke(Result.failure(IllegalStateException("Callback should be null")))
Expand Down

0 comments on commit 219c489

Please sign in to comment.