From 6b32cb7e0b6e4939575a7cfb790577465f8a7f13 Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Thu, 19 Sep 2024 14:57:12 +0200 Subject: [PATCH] ktlint format Signed-off-by: sowjanyakch --- .../java/com/nextcloud/talk/activities/CallActivity.kt | 4 +++- app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt | 2 +- .../conversationcreation/ConversationCreationActivity.kt | 8 ++------ .../conversationcreation/ConversationCreationViewModel.kt | 5 ++--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt index 6376ce8fe..4302e2754 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt @@ -1633,7 +1633,9 @@ class CallActivity : CallBaseActivity() { private fun callOrJoinRoomViaWebSocket() { if (hasExternalSignalingServer) { webSocketClient!!.joinRoomWithRoomTokenAndSession( - roomToken!!, callSession, externalSignalingServer!!.federation + roomToken!!, + callSession, + externalSignalingServer!!.federation ) } else { performCall() diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index f71e16464..7d4a4d902 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -3240,7 +3240,7 @@ class ChatActivity : val lon = data["longitude"]!! metaData = "{\"type\":\"geo-location\",\"id\":\"geo:$lat,$lon\",\"latitude\":\"$lat\"," + - "\"longitude\":\"$lon\",\"name\":\"$name\"}" + "\"longitude\":\"$lon\",\"name\":\"$name\"}" } when (type) { diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt index 518c2e61e..2e5e83323 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt @@ -138,7 +138,7 @@ fun ConversationCreationScreen( context: Context, pickImage: PickImage ) { - val selectedImageUri = conversationCreationViewModel.selectedImageUriState.collectAsState().value + val selectedImageUri = conversationCreationViewModel.selectedImageUriState.collectAsState().value val imagePickerLauncher = rememberLauncherForActivityResult( contract = ActivityResultContracts.StartActivityForResult() @@ -550,7 +550,6 @@ fun ConversationOptions( @Composable fun ShowPasswordDialog(onDismiss: () -> Unit, conversationCreationViewModel: ConversationCreationViewModel) { - var password by remember { mutableStateOf("") } AlertDialog( @@ -583,10 +582,7 @@ fun ShowPasswordDialog(onDismiss: () -> Unit, conversationCreationViewModel: Con } @Composable -fun CreateConversation( - conversationCreationViewModel: ConversationCreationViewModel, - context: Context -) { +fun CreateConversation(conversationCreationViewModel: ConversationCreationViewModel, context: Context) { val selectedParticipants by conversationCreationViewModel.selectedParticipants.collectAsState() Box( modifier = Modifier diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt index 99fa5ae67..c30630ffb 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt @@ -33,8 +33,7 @@ class ConversationCreationViewModel @Inject constructor( private val roomViewState = MutableStateFlow(RoomUIState.None) private val selectedImageUri = MutableStateFlow(null) - val selectedImageUriState:StateFlow = selectedImageUri - + val selectedImageUriState: StateFlow = selectedImageUri private val _currentUser = userManager.currentUser.blockingGet() val currentUser: User = _currentUser @@ -43,7 +42,7 @@ class ConversationCreationViewModel @Inject constructor( _selectedParticipants.value = participants } - fun updateSelectedImageUri(uri:Uri?){ + fun updateSelectedImageUri(uri: Uri?) { selectedImageUri.value = uri }