Drop the comments from the grouping timeout

Review feedback: the constant name and the test names carry the rule.
This commit is contained in:
hayaksi1
2026-08-09 14:51:30 +03:00
parent b5e95e27d4
commit 72cc8f848d
2 changed files with 0 additions and 7 deletions
@@ -38,7 +38,6 @@ import io.element.android.libraries.matrix.ui.messages.reply.map
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toImmutableList
/** Events further apart than this are never grouped together, even when sent by the same person. */
private const val GROUPING_TIMEOUT_MS = 5 * 60 * 1000L
@AssistedInject
@@ -224,10 +223,6 @@ class TimelineItemEventFactory(
val previousSender = prevTimelineItem?.event?.sender
val nextSender = nextTimelineItem?.event?.sender
// Two events from the same sender are only grouped together if they were sent within
// GROUPING_TIMEOUT_MS of each other. The delta is symmetric between a pair of neighbours, so
// both items always agree on where the group is split.
// See https://github.com/element-hq/element-x-android/issues/4757
val previousIsGroupable = prevTimelineItem?.let {
it.canBeDisplayedInBubbleBlock() &&
currentTimelineItem.event.timestamp - it.event.timestamp <= GROUPING_TIMEOUT_MS
@@ -106,8 +106,6 @@ class TimelineItemsFactoryTest {
roomMembers = emptyList(),
renderReadReceipts = false,
)
// The factory emits the timeline newest-first; reverse it so the assertions below read
// in the same chronological order as the timestamps that were fed in.
positions = awaitItem()
.filterIsInstance<TimelineItem.Event>()
.map { it.groupPosition }