mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +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)
|
MatrixItem.UserItem(permalinkData.userId, user?.displayName, user?.avatarUrl)
|
||||||
}
|
}
|
||||||
is PermalinkData.RoomLink -> {
|
is PermalinkData.RoomLink -> {
|
||||||
val room: RoomSummary? = sessionHolder.getSafeActiveSession()?.getRoomSummary(permalinkData.roomIdOrAlias)
|
// Exclude event link (used in reply event)
|
||||||
if (permalinkData.isRoomAlias) {
|
if (permalinkData.eventId == null) {
|
||||||
MatrixItem.RoomAliasItem(permalinkData.roomIdOrAlias, room?.displayName, room?.avatarUrl)
|
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 {
|
} else {
|
||||||
MatrixItem.RoomItem(permalinkData.roomIdOrAlias, room?.displayName, room?.avatarUrl)
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is PermalinkData.GroupLink -> {
|
is PermalinkData.GroupLink -> {
|
||||||
|
|
Loading…
Reference in a new issue