From a4aa38ee43e69347e6b8e1c4ff74d5c65b9d8e58 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 16 Dec 2019 17:14:26 +0100 Subject: [PATCH] Fix new issue on permalink click --- CHANGES.md | 2 +- .../im/vector/riotx/features/permalink/PermalinkHandler.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1228ea65ca..5f83727cd7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,7 @@ Other changes: Bugfix 🐛: - Scroll breadcrumbs to top when opened - Render default room name when it starts with an emoji (#477) - - Do not display " (IRC)") in display names https://github.com/vector-im/riot-android/issues/444 + - Do not display " (IRC)" in display names https://github.com/vector-im/riot-android/issues/444 Translations 🗣: - diff --git a/vector/src/main/java/im/vector/riotx/features/permalink/PermalinkHandler.kt b/vector/src/main/java/im/vector/riotx/features/permalink/PermalinkHandler.kt index c849166738..e46adc53fc 100644 --- a/vector/src/main/java/im/vector/riotx/features/permalink/PermalinkHandler.kt +++ b/vector/src/main/java/im/vector/riotx/features/permalink/PermalinkHandler.kt @@ -57,7 +57,7 @@ class PermalinkHandler @Inject constructor(private val session: Session, .observeOn(AndroidSchedulers.mainThread()) .map { val roomId = it.getOrNull() - if (navigateToRoomInterceptor?.navToRoom(roomId) != true) { + if (navigateToRoomInterceptor?.navToRoom(roomId, permalinkData.eventId) != true) { openRoom(context, roomId, permalinkData.eventId, buildTask) } true @@ -87,9 +87,9 @@ class PermalinkHandler @Inject constructor(private val session: Session, } /** - * Open room either joined, or not unknown + * Open room either joined, or not */ - private fun openRoom(context: Context, roomId: String?, eventId: String? = null, buildTask: Boolean) { + private fun openRoom(context: Context, roomId: String?, eventId: String?, buildTask: Boolean) { return if (roomId != null && session.getRoom(roomId) != null) { navigator.openRoom(context, roomId, eventId, buildTask) } else {