mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
Fix / sending poll event appears forever
This commit is contained in:
parent
3755d866b1
commit
eb5088c699
1 changed files with 9 additions and 6 deletions
|
@ -317,12 +317,15 @@ internal class DefaultTimeline(
|
|||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onLocalEchoCreated(onLocalEchoCreated: OnLocalEchoCreated) {
|
||||
if (isLive && onLocalEchoCreated.roomId == roomId) {
|
||||
listeners.forEach {
|
||||
it.onNewTimelineEvents(listOf(onLocalEchoCreated.timelineEvent.eventId))
|
||||
// do not add events that would have been filtered
|
||||
if (listOf(onLocalEchoCreated.timelineEvent).filterEventsWithSettings().isNotEmpty()) {
|
||||
listeners.forEach {
|
||||
it.onNewTimelineEvents(listOf(onLocalEchoCreated.timelineEvent.eventId))
|
||||
}
|
||||
Timber.v("On local echo created: $onLocalEchoCreated")
|
||||
inMemorySendingEvents.add(0, onLocalEchoCreated.timelineEvent)
|
||||
postSnapshot()
|
||||
}
|
||||
Timber.v("On local echo created: $onLocalEchoCreated")
|
||||
inMemorySendingEvents.add(0, onLocalEchoCreated.timelineEvent)
|
||||
postSnapshot()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -778,7 +781,7 @@ internal class DefaultTimeline(
|
|||
|
||||
val filterEdits = if (settings.filterEdits && it.root.type == EventType.MESSAGE) {
|
||||
val messageContent = it.root.content.toModel<MessageContent>()
|
||||
messageContent?.relatesTo?.type != RelationType.REPLACE
|
||||
messageContent?.relatesTo?.type != RelationType.REPLACE && messageContent?.relatesTo?.type != RelationType.RESPONSE
|
||||
} else {
|
||||
true
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue