mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-27 12:00:03 +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> {
|
||||
|
||||
suspend fun set(value: T)
|
||||
suspend fun emit(value: T)
|
||||
|
||||
fun post(value: T)
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ open class BehaviorDataSource<T>(private val defaultValue: T? = null) : MutableD
|
|||
return mutableFlow
|
||||
}
|
||||
|
||||
override suspend fun set(value: T) {
|
||||
override suspend fun emit(value: T) {
|
||||
mutableFlow.emit(value)
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ open class PublishDataSource<T> : MutableDataSource<T> {
|
|||
return mutableFlow
|
||||
}
|
||||
|
||||
override suspend fun set(value: T) {
|
||||
override suspend fun emit(value: T) {
|
||||
mutableFlow.emit(value)
|
||||
}
|
||||
|
||||
|
|
|
@ -473,13 +473,13 @@ class MessageComposerViewModel @AssistedInject constructor(
|
|||
}
|
||||
is ParsedCommand.UpgradeRoom -> {
|
||||
viewModelScope.launch {
|
||||
_viewEvents.set(
|
||||
_viewEvents.emit(
|
||||
MessageComposerViewEvents.ShowRoomUpgradeDialog(
|
||||
parsedCommand.newVersion,
|
||||
room.roomSummary()?.isPublic ?: false
|
||||
)
|
||||
)
|
||||
_viewEvents.set(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
|
||||
_viewEvents.emit(MessageComposerViewEvents.SlashCommandResultOk(parsedCommand))
|
||||
popDraft()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue