Fix new issue on permalink click

This commit is contained in:
Benoit Marty 2019-12-16 17:14:26 +01:00
parent 4a11d028c0
commit a4aa38ee43
2 changed files with 4 additions and 4 deletions

View File

@ -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 🗣:
-

View File

@ -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 {