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