mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-29 14:38:45 +03:00
View displayIndex in timeline to debug chunks if developer info enabled
Change-Id: Id52e6f69b6fbe18cb78a3bdeca220fa58b4e7a82
This commit is contained in:
parent
96d7e4859b
commit
4b12f162a0
1 changed files with 8 additions and 1 deletions
|
@ -54,6 +54,7 @@ import javax.inject.Inject
|
||||||
* This class compute if data of an event (such has avatar, display name, ...) should be displayed, depending on the previous event in the timeline
|
* This class compute if data of an event (such has avatar, display name, ...) should be displayed, depending on the previous event in the timeline
|
||||||
*/
|
*/
|
||||||
class MessageInformationDataFactory @Inject constructor(private val session: Session,
|
class MessageInformationDataFactory @Inject constructor(private val session: Session,
|
||||||
|
private val vectorPreferences: VectorPreferences,
|
||||||
private val dateFormatter: VectorDateFormatter,
|
private val dateFormatter: VectorDateFormatter,
|
||||||
private val messageLayoutFactory: TimelineMessageLayoutFactory,
|
private val messageLayoutFactory: TimelineMessageLayoutFactory,
|
||||||
private val reactionsSummaryFactory: ReactionsSummaryFactory) {
|
private val reactionsSummaryFactory: ReactionsSummaryFactory) {
|
||||||
|
@ -74,7 +75,13 @@ class MessageInformationDataFactory @Inject constructor(private val session: Ses
|
||||||
val isLastFromThisSender = prevDisplayableEvent?.root?.senderId != event.root.senderId ||
|
val isLastFromThisSender = prevDisplayableEvent?.root?.senderId != event.root.senderId ||
|
||||||
prevDisplayableEvent?.root?.localDateTime()?.toLocalDate() != date.toLocalDate()
|
prevDisplayableEvent?.root?.localDateTime()?.toLocalDate() != date.toLocalDate()
|
||||||
|
|
||||||
val time = dateFormatter.format(event.root.originServerTs, DateFormatKind.MESSAGE_SIMPLE)
|
val time = dateFormatter.format(event.root.originServerTs, DateFormatKind.MESSAGE_SIMPLE).let {
|
||||||
|
if (vectorPreferences.developerShowDebugInfo()) {
|
||||||
|
"$it | ${event.displayIndex}"
|
||||||
|
} else {
|
||||||
|
it
|
||||||
|
}
|
||||||
|
}
|
||||||
val e2eDecoration = getE2EDecoration(roomSummary, event)
|
val e2eDecoration = getE2EDecoration(roomSummary, event)
|
||||||
|
|
||||||
// Sometimes, member information is not available at this point yet, so let's completely rely on the DM flag for now.
|
// Sometimes, member information is not available at this point yet, so let's completely rely on the DM flag for now.
|
||||||
|
|
Loading…
Reference in a new issue