forked from GitHub-Mirror/riotX-android
Close detail room screen when the room is left with another client (#256)
This commit is contained in:
parent
cd6624a8a6
commit
10490e3aa6
@ -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:
|
||||||
-
|
-
|
||||||
|
@ -536,11 +536,16 @@ class RoomDetailFragment :
|
|||||||
|
|
||||||
private fun renderRoomSummary(state: RoomDetailViewState) {
|
private fun renderRoomSummary(state: RoomDetailViewState) {
|
||||||
state.asyncRoomSummary()?.let {
|
state.asyncRoomSummary()?.let {
|
||||||
|
if (it.membership.isLeft()) {
|
||||||
|
Timber.w("The room has been left")
|
||||||
|
activity?.finish()
|
||||||
|
} else {
|
||||||
roomToolbarTitleView.text = it.displayName
|
roomToolbarTitleView.text = it.displayName
|
||||||
avatarRenderer.render(it, roomToolbarAvatarImageView)
|
avatarRenderer.render(it, roomToolbarAvatarImageView)
|
||||||
roomToolbarSubtitleView.setTextOrHide(it.topic)
|
roomToolbarSubtitleView.setTextOrHide(it.topic)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun renderTextComposerState(state: TextComposerViewState) {
|
private fun renderTextComposerState(state: TextComposerViewState) {
|
||||||
autocompleteUserPresenter.render(state.asyncUsers)
|
autocompleteUserPresenter.render(state.asyncUsers)
|
||||||
|
Loading…
Reference in New Issue
Block a user