diff --git a/changelog.d/7411.bugfix b/changelog.d/7411.bugfix new file mode 100644 index 0000000000..2de5280337 --- /dev/null +++ b/changelog.d/7411.bugfix @@ -0,0 +1 @@ +Fix unusable area when Rich Text Editor is enabled and the user has no permissions in a room diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt index 9d50cdb070..24184f237e 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt @@ -1131,6 +1131,8 @@ class TimelineFragment : lazyLoadedViews.inviteView(false)?.isVisible = false if (mainState.tombstoneEvent == null) { + views.composerContainer.isVisible = messageComposerState.isComposerVisible + when (messageComposerState.canSendMessage) { CanSendStatus.Allowed -> { NotificationAreaView.State.Hidden diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerFragment.kt index 55ec922a57..a93574a2bc 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerFragment.kt @@ -252,13 +252,6 @@ class MessageComposerFragment : VectorBaseFragment(), A messageComposerViewModel.endAllVoiceActions() } - override fun invalidate() = withState(timelineViewModel, messageComposerViewModel) { mainState, messageComposerState -> - if (mainState.tombstoneEvent != null) return@withState - - composer.setInvisible(!messageComposerState.isComposerVisible) - composer.sendButton.isInvisible = !messageComposerState.isSendButtonVisible - } - private fun setupComposer() { val composerEditText = composer.editText composerEditText.setHint(R.string.room_message_placeholder)