mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Fix trail display (from instead of to for incoming types)
This commit is contained in:
parent
058d2e6b72
commit
9385d19ad0
1 changed files with 11 additions and 1 deletions
|
@ -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 a new issue