reformat code

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2024-09-13 16:56:46 +02:00
parent 4cea7b2390
commit 033e3e86c1
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B
3 changed files with 13 additions and 7 deletions

View file

@ -2437,8 +2437,10 @@ class ChatActivity :
if (currentConversation!!.remoteServer != null) {
val apiVersion = ApiUtils.getSignalingApiVersion(conversationUser!!, intArrayOf(ApiUtils.API_V3, 2, 1))
ncApi!!.getSignalingSettings(credentials, ApiUtils.getUrlForSignalingSettings(apiVersion, conversationUser!!.baseUrl,
roomToken!!)).blockingSubscribe(object : Observer<SignalingSettingsOverall> {
ncApi!!.getSignalingSettings(
credentials,
ApiUtils.getUrlForSignalingSettings(apiVersion, conversationUser!!.baseUrl, roomToken!!)
).blockingSubscribe(object : Observer<SignalingSettingsOverall> {
override fun onSubscribe(d: Disposable) {
// unused atm
}

View file

@ -369,6 +369,7 @@ class WebSocketInstance internal constructor(
return hasMCU
}
@Suppress("Detekt.ComplexMethod")
fun joinRoomWithRoomTokenAndSession(
roomToken: String,
normalBackendSession: String?,
@ -386,8 +387,11 @@ class WebSocketInstance internal constructor(
currentNormalBackendSession = ""
currentFederation = null
sendMessage(message)
} else if (roomToken == currentRoomToken && normalBackendSession == currentNormalBackendSession &&
federation?.roomId == currentFederation?.roomId && federation?.nextcloudServer == federation?.nextcloudServer
} else if (
roomToken == currentRoomToken &&
normalBackendSession == currentNormalBackendSession &&
federation?.roomId == currentFederation?.roomId &&
federation?.nextcloudServer == federation?.nextcloudServer
) {
Log.d(TAG, "roomToken & session are unchanged. Joining locally without to send websocket message")
sendRoomJoinedEvent()