File tree 2 files changed +8
-10
lines changed
firebase-common/src/commonMain/kotlin/dev/gitlive/firebase
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ import kotlinx.coroutines.channels.SendChannel
6
6
7
7
// workaround for https://github.com/Kotlin/kotlinx.coroutines/issues/974
8
8
@ExperimentalCoroutinesApi
9
- fun <E > SendChannel<E>.safeOffer (element : E ) = try {
10
- ! isClosedForSend && offer(element)
11
- } catch (e : ClosedSendChannelException ) {
12
- false
9
+ fun <E > SendChannel<E>.safeOffer (element : E ): Boolean {
10
+ return runCatching { ! isClosedForSend && offer(element) }.getOrDefault(false )
13
11
}
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ android.useAndroidX=true
6
6
testOptions.unitTests.isIncludeAndroidResources = true
7
7
8
8
# Versions:
9
- firebase-app.version =0.4.10
10
- firebase-auth.version =0.4.10
11
- firebase-common.version =0.4.10
12
- firebase-database.version =0.4.10
13
- firebase-firestore.version =0.4.10
14
- firebase-functions.version =0.4.10
9
+ firebase-app.version =0.4.11
10
+ firebase-auth.version =0.4.11
11
+ firebase-common.version =0.4.11
12
+ firebase-database.version =0.4.11
13
+ firebase-firestore.version =0.4.11
14
+ firebase-functions.version =0.4.11
You can’t perform that action at this time.
0 commit comments