mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-28 18:09:30 +01:00
Revert "Hide redactions from the overview except for "show all events" setting"
This reverts commit 29953755860b632aacebf961d2cc758195d5e253.
This commit is contained in:
parent
f40d96017b
commit
9a61361e3e
@ -57,8 +57,7 @@ internal fun TimelineEventEntity.Companion.latestEvent(realm: Realm,
|
||||
roomId: String,
|
||||
includesSending: Boolean,
|
||||
filterContentRelation: Boolean = false,
|
||||
filterTypes: List<String> = emptyList(),
|
||||
filterRedactions: Boolean = false): TimelineEventEntity? {
|
||||
filterTypes: List<String> = emptyList()): TimelineEventEntity? {
|
||||
val roomEntity = RoomEntity.where(realm, roomId).findFirst() ?: return null
|
||||
val sendingTimelineEvents = roomEntity.sendingTimelineEvents.where().filterTypes(filterTypes)
|
||||
val liveEvents = ChunkEntity.findLastForwardChunkOfRoom(realm, roomId)?.timelineEvents?.where()?.filterTypes(filterTypes)
|
||||
@ -67,10 +66,6 @@ internal fun TimelineEventEntity.Companion.latestEvent(realm: Realm,
|
||||
?.not()?.like(TimelineEventEntityFields.ROOT.CONTENT, TimelineEventFilter.Content.EDIT)
|
||||
?.not()?.like(TimelineEventEntityFields.ROOT.CONTENT, TimelineEventFilter.Content.RESPONSE)
|
||||
}
|
||||
if (filterRedactions) {
|
||||
liveEvents
|
||||
?.not()?.like(TimelineEventEntityFields.ROOT.UNSIGNED_DATA, TimelineEventFilter.Unsigned.REDACTED)
|
||||
}
|
||||
val query = if (includesSending && sendingTimelineEvents.findAll().isNotEmpty()) {
|
||||
sendingTimelineEvents
|
||||
} else {
|
||||
|
@ -161,9 +161,9 @@ internal class RoomSummaryUpdater @Inject constructor(
|
||||
val latestPreviewableEvent = TimelineEventEntity.latestEvent(realm, roomId, includesSending = true,
|
||||
filterTypes = PREVIEWABLE_TYPES, filterContentRelation = true)
|
||||
val latestPreviewableContentEvent = TimelineEventEntity.latestEvent(realm, roomId, includesSending = true,
|
||||
filterTypes = PREVIEWABLE_CONTENT_TYPES, filterContentRelation = true, filterRedactions = true)
|
||||
filterTypes = PREVIEWABLE_CONTENT_TYPES, filterContentRelation = true)
|
||||
val latestPreviewableOriginalContentEvent = TimelineEventEntity.latestEvent(realm, roomId, includesSending = true,
|
||||
filterTypes = PREVIEWABLE_ORIGINAL_CONTENT_TYPES, filterContentRelation = true, filterRedactions = true)
|
||||
filterTypes = PREVIEWABLE_ORIGINAL_CONTENT_TYPES, filterContentRelation = true)
|
||||
|
||||
val lastNameEvent = CurrentStateEventEntity.getOrNull(realm, roomId, type = EventType.STATE_ROOM_NAME, stateKey = "")?.root
|
||||
val lastTopicEvent = CurrentStateEventEntity.getOrNull(realm, roomId, type = EventType.STATE_ROOM_TOPIC, stateKey = "")?.root
|
||||
|
Loading…
x
Reference in New Issue
Block a user