Close detail room screen when the room is left with another client (#256)

This commit is contained in:
Benoit Marty 2019-07-19 16:00:06 +02:00
parent cd6624a8a6
commit 10490e3aa6
2 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,7 @@ Other changes:


Bugfix: Bugfix:
- Edited message: link confusion when (edited) appears in body (#398) - Edited message: link confusion when (edited) appears in body (#398)
- Close detail room screen when the room is left with another client (#256)


Translations: Translations:
- -

View File

@ -536,9 +536,14 @@ class RoomDetailFragment :


private fun renderRoomSummary(state: RoomDetailViewState) { private fun renderRoomSummary(state: RoomDetailViewState) {
state.asyncRoomSummary()?.let { state.asyncRoomSummary()?.let {
roomToolbarTitleView.text = it.displayName if (it.membership.isLeft()) {
avatarRenderer.render(it, roomToolbarAvatarImageView) Timber.w("The room has been left")
roomToolbarSubtitleView.setTextOrHide(it.topic) activity?.finish()
} else {
roomToolbarTitleView.text = it.displayName
avatarRenderer.render(it, roomToolbarAvatarImageView)
roomToolbarSubtitleView.setTextOrHide(it.topic)
}
} }
} }