Skip to content

Commit

Permalink
fix to hide messageInputFragment when user has no restriction to write
Browse files Browse the repository at this point in the history
The messageInputFragment was hidden by checkShowMessageInputView(), but it was immediately shown again by checkLobbyState()

This fix will execute checkShowMessageInputView() inside checkLobbyState() in the correct order.

Additionally, the check
checkLobbyState()
has to be already executed in
GetCapabilitiesInitialLoadState
as well as
checkShowCallButtons()

Otherwise the expected behavior would only be set after 30 seconds.

An improvemnt for the future must be to improve the capabilities handling.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
  • Loading branch information
mahibi committed Sep 18, 2024
1 parent 3db9bc6 commit 9e91bde
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ class ChatActivity :

invalidateOptionsMenu()
checkShowCallButtons()
checkShowMessageInputView()
checkLobbyState()
updateRoomTimerHandler()
}
Expand All @@ -603,6 +602,9 @@ class ChatActivity :
loadAvatarForStatusBar()
setupSwipeToReply()
setActionBarTitle()

checkShowCallButtons()
checkLobbyState()
updateRoomTimerHandler()

val urlForChatting = ApiUtils.getUrlForChat(chatApiVersion, conversationUser?.baseUrl, roomToken)
Expand Down Expand Up @@ -1892,12 +1894,12 @@ class ChatActivity :
} else {
binding.lobby.lobbyView.visibility = View.GONE
binding.messagesListView.visibility = View.VISIBLE
binding.fragmentContainerActivityChat.visibility = View.VISIBLE
checkShowMessageInputView()
}
} else {
binding.lobby.lobbyView.visibility = View.GONE
binding.messagesListView.visibility = View.VISIBLE
binding.fragmentContainerActivityChat.visibility = View.VISIBLE
checkShowMessageInputView()
}
}

Expand Down

0 comments on commit 9e91bde

Please sign in to comment.