Fix new issue on permalink click
This commit is contained in:
parent
4a11d028c0
commit
a4aa38ee43
|
@ -14,7 +14,7 @@ Other changes:
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
- Scroll breadcrumbs to top when opened
|
- Scroll breadcrumbs to top when opened
|
||||||
- Render default room name when it starts with an emoji (#477)
|
- 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 🗣:
|
Translations 🗣:
|
||||||
-
|
-
|
||||||
|
|
|
@ -57,7 +57,7 @@ class PermalinkHandler @Inject constructor(private val session: Session,
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.map {
|
.map {
|
||||||
val roomId = it.getOrNull()
|
val roomId = it.getOrNull()
|
||||||
if (navigateToRoomInterceptor?.navToRoom(roomId) != true) {
|
if (navigateToRoomInterceptor?.navToRoom(roomId, permalinkData.eventId) != true) {
|
||||||
openRoom(context, roomId, permalinkData.eventId, buildTask)
|
openRoom(context, roomId, permalinkData.eventId, buildTask)
|
||||||
}
|
}
|
||||||
true
|
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) {
|
return if (roomId != null && session.getRoom(roomId) != null) {
|
||||||
navigator.openRoom(context, roomId, eventId, buildTask)
|
navigator.openRoom(context, roomId, eventId, buildTask)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue