Fix trail display (from instead of to for incoming types)
This commit is contained in:
parent
058d2e6b72
commit
9385d19ad0
|
@ -55,7 +55,7 @@ class GossipingTrailPagedEpoxyController @Inject constructor(
|
|||
description(
|
||||
span {
|
||||
+host.vectorDateFormatter.format(event.ageLocalTs, DateFormatKind.DEFAULT_DATE_AND_TIME)
|
||||
span("\nfrom: ") {
|
||||
span("\n${host.senderFromTo(event.type)}: ") {
|
||||
textStyle = "bold"
|
||||
}
|
||||
+"${event.info.userId}|${event.info.deviceId}"
|
||||
|
@ -101,4 +101,14 @@ class GossipingTrailPagedEpoxyController @Inject constructor(
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun senderFromTo(type: TrailType): String {
|
||||
return when (type) {
|
||||
TrailType.OutgoingKeyWithheld,
|
||||
TrailType.OutgoingKeyForward -> "to"
|
||||
TrailType.IncomingKeyRequest,
|
||||
TrailType.IncomingKeyForward -> "from"
|
||||
TrailType.Unknown -> ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue