mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-29 01:48:53 +03:00
reformat code
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
4cea7b2390
commit
033e3e86c1
3 changed files with 13 additions and 7 deletions
|
@ -1633,8 +1633,8 @@ class CallActivity : CallBaseActivity() {
|
||||||
private fun callOrJoinRoomViaWebSocket() {
|
private fun callOrJoinRoomViaWebSocket() {
|
||||||
if (hasExternalSignalingServer) {
|
if (hasExternalSignalingServer) {
|
||||||
webSocketClient!!.joinRoomWithRoomTokenAndSession(
|
webSocketClient!!.joinRoomWithRoomTokenAndSession(
|
||||||
roomToken!!, callSession, externalSignalingServer!!.federation
|
roomToken!!, callSession, externalSignalingServer!!.federation
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
performCall()
|
performCall()
|
||||||
}
|
}
|
||||||
|
|
|
@ -2437,8 +2437,10 @@ class ChatActivity :
|
||||||
|
|
||||||
if (currentConversation!!.remoteServer != null) {
|
if (currentConversation!!.remoteServer != null) {
|
||||||
val apiVersion = ApiUtils.getSignalingApiVersion(conversationUser!!, intArrayOf(ApiUtils.API_V3, 2, 1))
|
val apiVersion = ApiUtils.getSignalingApiVersion(conversationUser!!, intArrayOf(ApiUtils.API_V3, 2, 1))
|
||||||
ncApi!!.getSignalingSettings(credentials, ApiUtils.getUrlForSignalingSettings(apiVersion, conversationUser!!.baseUrl,
|
ncApi!!.getSignalingSettings(
|
||||||
roomToken!!)).blockingSubscribe(object : Observer<SignalingSettingsOverall> {
|
credentials,
|
||||||
|
ApiUtils.getUrlForSignalingSettings(apiVersion, conversationUser!!.baseUrl, roomToken!!)
|
||||||
|
).blockingSubscribe(object : Observer<SignalingSettingsOverall> {
|
||||||
override fun onSubscribe(d: Disposable) {
|
override fun onSubscribe(d: Disposable) {
|
||||||
// unused atm
|
// unused atm
|
||||||
}
|
}
|
||||||
|
@ -3239,7 +3241,7 @@ class ChatActivity :
|
||||||
val lon = data["longitude"]!!
|
val lon = data["longitude"]!!
|
||||||
metaData =
|
metaData =
|
||||||
"{\"type\":\"geo-location\",\"id\":\"geo:$lat,$lon\",\"latitude\":\"$lat\"," +
|
"{\"type\":\"geo-location\",\"id\":\"geo:$lat,$lon\",\"latitude\":\"$lat\"," +
|
||||||
"\"longitude\":\"$lon\",\"name\":\"$name\"}"
|
"\"longitude\":\"$lon\",\"name\":\"$name\"}"
|
||||||
}
|
}
|
||||||
|
|
||||||
when (type) {
|
when (type) {
|
||||||
|
|
|
@ -369,6 +369,7 @@ class WebSocketInstance internal constructor(
|
||||||
return hasMCU
|
return hasMCU
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("Detekt.ComplexMethod")
|
||||||
fun joinRoomWithRoomTokenAndSession(
|
fun joinRoomWithRoomTokenAndSession(
|
||||||
roomToken: String,
|
roomToken: String,
|
||||||
normalBackendSession: String?,
|
normalBackendSession: String?,
|
||||||
|
@ -386,8 +387,11 @@ class WebSocketInstance internal constructor(
|
||||||
currentNormalBackendSession = ""
|
currentNormalBackendSession = ""
|
||||||
currentFederation = null
|
currentFederation = null
|
||||||
sendMessage(message)
|
sendMessage(message)
|
||||||
} else if (roomToken == currentRoomToken && normalBackendSession == currentNormalBackendSession &&
|
} else if (
|
||||||
federation?.roomId == currentFederation?.roomId && federation?.nextcloudServer == federation?.nextcloudServer
|
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")
|
Log.d(TAG, "roomToken & session are unchanged. Joining locally without to send websocket message")
|
||||||
sendRoomJoinedEvent()
|
sendRoomJoinedEvent()
|
||||||
|
|
Loading…
Reference in a new issue