mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Don't group timeline items if more than 5 minutes has passed. (#4138)
Matches the behaviour on web.
This commit is contained in:
@@ -840,8 +840,9 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol {
|
||||
return false
|
||||
}
|
||||
|
||||
// can be improved by adding a date threshold
|
||||
return eventTimelineItem.properties.reactions.isEmpty && eventTimelineItem.sender == otherEventTimelineItem.sender
|
||||
return eventTimelineItem.sender == otherEventTimelineItem.sender
|
||||
&& eventTimelineItem.properties.reactions.isEmpty // Reactions break the grouping.
|
||||
&& otherEventTimelineItem.timestamp.timeIntervalSince(eventTimelineItem.timestamp) < 5 * 60 // As does the passage of time.
|
||||
}
|
||||
|
||||
// MARK: - Direct chats logics
|
||||
|
||||
Reference in New Issue
Block a user