Fix unusable area at the bottom when RTE is enabled and the user has no permissions in a room.

This commit is contained in:
Jorge Martín 2022-10-24 08:32:32 +02:00
parent 31811bb7e0
commit 347eeb8a37
3 changed files with 3 additions and 7 deletions

1
changelog.d/7411.bugfix Normal file
View File

@ -0,0 +1 @@
Fix unusable area when Rich Text Editor is enabled and the user has no permissions in a room

View File

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

View File

@ -252,13 +252,6 @@ class MessageComposerFragment : VectorBaseFragment<FragmentComposerBinding>(), 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)