mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-23 13:35:33 +03:00
Fix checking lobby state from chat controller while in a call
The chat controller gets the room information again and again to check whether the lobby is enabled and update the UI as needed. This loop is stopped when the chat controller is detached, but only if no call is active; if a call is active the room information will still be got again and again, even if the chat controller is detached. To solve that now getting the room information is simply stopped when the chat controller is detached, no matter if there is an active call or not, and started again when joining the room, which is done when the chat controller is attached. However, this is just a quick fix that does not solve the issue in all cases; the loop can still continue during calls, for example if the request to get the information is sent before detaching the controller and the response is received once the controller was detached, as that would start the timer again. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
53e3543839
commit
5513f9c88f
1 changed files with 7 additions and 0 deletions
|
@ -1818,6 +1818,12 @@ class ChatController(args: Bundle) :
|
|||
activity?.findViewById<View>(R.id.toolbar)?.setOnClickListener(null)
|
||||
}
|
||||
|
||||
checkingLobbyStatus = false
|
||||
|
||||
if (lobbyTimerHandler != null) {
|
||||
lobbyTimerHandler?.removeCallbacksAndMessages(null)
|
||||
}
|
||||
|
||||
if (conversationUser != null && isActivityNotChangingConfigurations() && isNotInCall()) {
|
||||
ApplicationWideCurrentRoomHolder.getInstance().clear()
|
||||
if (inConversation && validSessionId()) {
|
||||
|
@ -1952,6 +1958,7 @@ class ChatController(args: Bundle) :
|
|||
currentConversation?.sessionId
|
||||
)
|
||||
}
|
||||
checkLobbyState()
|
||||
if (isFirstMessagesProcessing) {
|
||||
pullChatMessages(0)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue