mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-23 18:05:59 +03:00
Changes set method name to emit
This commit is contained in:
parent
b0ce32e97e
commit
e84f012b73
2 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@ interface DataSource<T> {
|
||||||
|
|
||||||
interface MutableDataSource<T> : DataSource<T> {
|
interface MutableDataSource<T> : DataSource<T> {
|
||||||
|
|
||||||
suspend fun set(value: T)
|
suspend fun emit(value: T)
|
||||||
|
|
||||||
fun post(value: T)
|
fun post(value: T)
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,7 @@ open class BehaviorDataSource<T>(private val defaultValue: T? = null) : MutableD
|
||||||
return mutableFlow
|
return mutableFlow
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun set(value: T) {
|
override suspend fun emit(value: T) {
|
||||||
mutableFlow.emit(value)
|
mutableFlow.emit(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@ open class PublishDataSource<T> : MutableDataSource<T> {
|
||||||
return mutableFlow
|
return mutableFlow
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun set(value: T) {
|
override suspend fun emit(value: T) {
|
||||||
mutableFlow.emit(value)
|
mutableFlow.emit(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -473,13 +473,13 @@ class MessageComposerViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
is ParsedCommand.UpgradeRoom -> {
|
is ParsedCommand.UpgradeRoom -> {
|
||||||
viewModelScope.launch {
|
viewModelScope.launch {
|
||||||
_viewEvents.set(
|
_viewEvents.emit(
|
||||||
MessageComposerViewEvents.ShowRoomUpgradeDialog(
|
MessageComposerViewEvents.ShowRoomUpgradeDialog(
|
||||||
parsedCommand.newVersion,
|
parsedCommand.newVersion,
|
||||||
room.roomSummary()?.isPublic ?: false
|
room.roomSummary()?.isPublic ?: false
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
_viewEvents.set(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
|
_viewEvents.emit(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
|
||||||
popDraft()
|
popDraft()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue