Create a fun
This commit is contained in:
parent
fcee85a682
commit
db77e7b817
|
@ -64,8 +64,18 @@ class MergedHeaderItemFactory @Inject constructor(private val avatarRenderer: Av
|
||||||
} else if (!event.canBeMerged() || (nextEvent?.root?.getClearType() == event.root.getClearType() && !addDaySeparator)) {
|
} else if (!event.canBeMerged() || (nextEvent?.root?.getClearType() == event.root.getClearType() && !addDaySeparator)) {
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
|
buildMembershipEventsMergedSummary(currentPosition, items, event, eventIdToHighlight, requestModelBuild, callback)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun buildMembershipEventsMergedSummary(currentPosition: Int,
|
||||||
|
items: List<TimelineEvent>,
|
||||||
|
event: TimelineEvent,
|
||||||
|
eventIdToHighlight: String?,
|
||||||
|
requestModelBuild: () -> Unit,
|
||||||
|
callback: TimelineEventController.Callback?): MergedMembershipEventsItem_? {
|
||||||
val prevSameTypeEvents = items.prevSameTypeEvents(currentPosition, 2)
|
val prevSameTypeEvents = items.prevSameTypeEvents(currentPosition, 2)
|
||||||
if (prevSameTypeEvents.isEmpty()) {
|
return if (prevSameTypeEvents.isEmpty()) {
|
||||||
null
|
null
|
||||||
} else {
|
} else {
|
||||||
var highlighted = false
|
var highlighted = false
|
||||||
|
@ -119,7 +129,6 @@ class MergedHeaderItemFactory @Inject constructor(private val avatarRenderer: Av
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private fun buildRoomCreationMergedSummary(currentPosition: Int,
|
private fun buildRoomCreationMergedSummary(currentPosition: Int,
|
||||||
items: List<TimelineEvent>,
|
items: List<TimelineEvent>,
|
||||||
|
|
Loading…
Reference in New Issue