Skip to content

Commit

Permalink
fixed session error
Browse files Browse the repository at this point in the history
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
  • Loading branch information
rapterjet2004 committed Jun 3, 2024
1 parent 1c8d25b commit bc8be97
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,20 @@ class ChatActivity :
checkShowCallButtons()
checkShowMessageInputView()
checkLobbyState()

if (!validSessionId()) {
joinRoomWithPassword()
chatViewModel.refreshChatParams(
setupFieldsForPullChatMessages(
false,
0,
false
)
)
} else {
Log.d(TAG, "already inConversation. joinRoomWithPassword is skipped")
}

updateRoomTimerHandler()
}

Expand All @@ -565,11 +579,7 @@ class ChatActivity :
replace(R.id.fragment_container_activity_chat, MessageInputFragment())
}

if (!validSessionId()) {
joinRoomWithPassword()
} else {
Log.d(TAG, "already inConversation. joinRoomWithPassword is skipped")
}
joinRoomWithPassword()

if (conversationUser?.userId != "?" &&
CapabilitiesUtil.hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.MENTION_FLAG)
Expand Down

0 comments on commit bc8be97

Please sign in to comment.