fixing wrong transient import
This commit is contained in:
parent
ed2541876f
commit
a863625672
|
@ -29,15 +29,13 @@ internal class TimelineUseCaseImpl(
|
|||
MessengerState(
|
||||
roomState = when {
|
||||
localEchos.isEmpty() -> roomState
|
||||
else -> mergeWithLocalEchosUseCase.invoke(
|
||||
roomState,
|
||||
roomService.findMember(roomId, userId) ?: RoomMember(
|
||||
userId,
|
||||
null,
|
||||
avatarUrl = null,
|
||||
),
|
||||
localEchos,
|
||||
)
|
||||
else -> {
|
||||
mergeWithLocalEchosUseCase.invoke(
|
||||
roomState,
|
||||
roomService.findMember(roomId, userId) ?: userId.toFallbackMember(),
|
||||
localEchos,
|
||||
)
|
||||
}
|
||||
},
|
||||
typing = events.filterIsInstance<SyncService.SyncEvent.Typing>().firstOrNull { it.roomId == roomId },
|
||||
self = userId,
|
||||
|
@ -47,6 +45,8 @@ internal class TimelineUseCaseImpl(
|
|||
|
||||
}
|
||||
|
||||
private fun UserId.toFallbackMember() = RoomMember(this, displayName = null, avatarUrl = null)
|
||||
|
||||
data class MessengerState(
|
||||
val self: UserId,
|
||||
val roomState: RoomState,
|
||||
|
|
|
@ -12,7 +12,7 @@ import app.dapk.st.matrix.message.internal.DefaultMessageService
|
|||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
import java.util.*
|
||||
import kotlinx.serialization.Transient
|
||||
|
||||
private val SERVICE_KEY = MessageService::class
|
||||
|
||||
|
|
Loading…
Reference in New Issue