mirror of
https://github.com/element-hq/element-android
synced 2024-11-24 18:35:40 +03:00
Fix issue with "in reply to" link
This commit is contained in:
parent
c992d32afd
commit
3b0624ea40
1 changed files with 9 additions and 4 deletions
|
@ -46,11 +46,16 @@ class MxLinkTagHandler(private val glideRequests: GlideRequests,
|
|||
MatrixItem.UserItem(permalinkData.userId, user?.displayName, user?.avatarUrl)
|
||||
}
|
||||
is PermalinkData.RoomLink -> {
|
||||
val room: RoomSummary? = sessionHolder.getSafeActiveSession()?.getRoomSummary(permalinkData.roomIdOrAlias)
|
||||
if (permalinkData.isRoomAlias) {
|
||||
MatrixItem.RoomAliasItem(permalinkData.roomIdOrAlias, room?.displayName, room?.avatarUrl)
|
||||
// Exclude event link (used in reply event)
|
||||
if (permalinkData.eventId == null) {
|
||||
val room: RoomSummary? = sessionHolder.getSafeActiveSession()?.getRoomSummary(permalinkData.roomIdOrAlias)
|
||||
if (permalinkData.isRoomAlias) {
|
||||
MatrixItem.RoomAliasItem(permalinkData.roomIdOrAlias, room?.displayName, room?.avatarUrl)
|
||||
} else {
|
||||
MatrixItem.RoomItem(permalinkData.roomIdOrAlias, room?.displayName, room?.avatarUrl)
|
||||
}
|
||||
} else {
|
||||
MatrixItem.RoomItem(permalinkData.roomIdOrAlias, room?.displayName, room?.avatarUrl)
|
||||
null
|
||||
}
|
||||
}
|
||||
is PermalinkData.GroupLink -> {
|
||||
|
|
Loading…
Reference in a new issue