You've already forked element-android
mirror of
https://github.com/vector-im/element-android.git
synced 2025-07-28 08:42:00 +03:00
Mavericks 2: clean after PR review
This commit is contained in:
@ -22,11 +22,10 @@ import kotlinx.coroutines.flow.onStart
|
||||
import kotlinx.coroutines.withContext
|
||||
|
||||
internal fun <T> Flow<T>.startWith(supplier: suspend () -> T): Flow<T> {
|
||||
return this
|
||||
.onStart {
|
||||
val value = withContext(Dispatchers.IO) {
|
||||
supplier()
|
||||
}
|
||||
emit(value)
|
||||
}
|
||||
return onStart {
|
||||
val value = withContext(Dispatchers.IO) {
|
||||
supplier()
|
||||
}
|
||||
emit(value)
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ import org.matrix.android.sdk.internal.crypto.model.CryptoDeviceInfo
|
||||
import org.matrix.android.sdk.internal.crypto.model.rest.DeviceInfo
|
||||
import org.matrix.android.sdk.internal.crypto.store.PrivateKeysInfo
|
||||
|
||||
class RxFlow(private val session: Session) {
|
||||
class FlowSession(private val session: Session) {
|
||||
|
||||
fun liveRoomSummaries(queryParams: RoomSummaryQueryParams): Flow<List<RoomSummary>> {
|
||||
return session.getRoomSummariesLive(queryParams).asFlow()
|
||||
@ -175,6 +175,6 @@ class RxFlow(private val session: Session) {
|
||||
}
|
||||
}
|
||||
|
||||
fun Session.flow(): RxFlow {
|
||||
return RxFlow(this)
|
||||
fun Session.flow(): FlowSession {
|
||||
return FlowSession(this)
|
||||
}
|
||||
|
Reference in New Issue
Block a user