mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-16 11:18:55 +03:00
Removes emit method from DataSource
This commit is contained in:
parent
a5fd11c204
commit
d586f64338
1 changed files with 0 additions and 10 deletions
|
@ -26,8 +26,6 @@ interface DataSource<T> {
|
|||
|
||||
interface MutableDataSource<T> : DataSource<T> {
|
||||
|
||||
suspend fun emit(value: T)
|
||||
|
||||
fun post(value: T)
|
||||
}
|
||||
|
||||
|
@ -45,10 +43,6 @@ open class BehaviorDataSource<T>(private val defaultValue: T? = null) : MutableD
|
|||
return mutableFlow
|
||||
}
|
||||
|
||||
override suspend fun emit(value: T) {
|
||||
mutableFlow.emit(value)
|
||||
}
|
||||
|
||||
override fun post(value: T) {
|
||||
mutableFlow.tryEmit(value)
|
||||
}
|
||||
|
@ -67,10 +61,6 @@ open class PublishDataSource<T>(bufferSize: Int = 10) : MutableDataSource<T> {
|
|||
return mutableFlow
|
||||
}
|
||||
|
||||
override suspend fun emit(value: T) {
|
||||
mutableFlow.emit(value)
|
||||
}
|
||||
|
||||
override fun post(value: T) {
|
||||
mutableFlow.tryEmit(value)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue