mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +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
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// can be improved by adding a date threshold
|
return eventTimelineItem.sender == otherEventTimelineItem.sender
|
||||||
return eventTimelineItem.properties.reactions.isEmpty && 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
|
// MARK: - Direct chats logics
|
||||||
|
|||||||
Reference in New Issue
Block a user