ktlintFormat

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2025-05-28 23:06:20 +02:00 committed by Marcel Hibbe
parent 05815ebeae
commit 87f8272b10
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
4 changed files with 10 additions and 15 deletions

View File

@ -7,7 +7,6 @@
package com.nextcloud.talk.contacts package com.nextcloud.talk.contacts
import android.annotation.SuppressLint
import androidx.lifecycle.ViewModel import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope import androidx.lifecycle.viewModelScope
import com.nextcloud.talk.models.json.autocomplete.AutocompleteUser import com.nextcloud.talk.models.json.autocomplete.AutocompleteUser
@ -37,14 +36,11 @@ class ContactsViewModel @Inject constructor(
private val _isAddParticipantsView = MutableStateFlow(false) private val _isAddParticipantsView = MutableStateFlow(false)
val isAddParticipantsView: StateFlow<Boolean> = _isAddParticipantsView val isAddParticipantsView: StateFlow<Boolean> = _isAddParticipantsView
@SuppressLint("PropertyName")
private val _enableAddButton = MutableStateFlow(false) private val _enableAddButton = MutableStateFlow(false)
val enableAddButton: StateFlow<Boolean> = _enableAddButton val enableAddButton: StateFlow<Boolean> = _enableAddButton
@SuppressLint("PropertyName")
private val _selectedContacts = MutableStateFlow<List<AutocompleteUser>>(emptyList()) private val _selectedContacts = MutableStateFlow<List<AutocompleteUser>>(emptyList())
@SuppressLint("PropertyName")
private val _clickAddButton = MutableStateFlow(false) private val _clickAddButton = MutableStateFlow(false)
private var hideAlreadyAddedParticipants: Boolean = false private var hideAlreadyAddedParticipants: Boolean = false

View File

@ -50,9 +50,9 @@ fun AppBar(
clickAddButton: (Boolean) -> Unit clickAddButton: (Boolean) -> Unit
) { ) {
val context = LocalContext.current val context = LocalContext.current
val appTitle = if(!isSearchActive){ val appTitle = if (!isSearchActive) {
title title
}else{ } else {
"" ""
} }
TopAppBar( TopAppBar(
@ -88,7 +88,7 @@ fun AppBar(
} }
) )
if (isSearchActive) { if (isSearchActive) {
Row (modifier = Modifier.fillMaxWidth()) { Row(modifier = Modifier.fillMaxWidth()) {
SearchComponent( SearchComponent(
text = searchQuery, text = searchQuery,
onTextChange = { searchQuery -> onTextChange = { searchQuery ->

View File

@ -37,7 +37,7 @@ fun SearchComponent(
text: String, text: String,
onTextChange: (String) -> Unit, onTextChange: (String) -> Unit,
onDisableSearch: () -> Unit, onDisableSearch: () -> Unit,
modifier:Modifier = Modifier modifier: Modifier = Modifier
) { ) {
val keyboardController = LocalSoftwareKeyboardController.current val keyboardController = LocalSoftwareKeyboardController.current
TextField( TextField(
@ -103,4 +103,3 @@ fun searchKeyboardActions(text: String, keyboardController: SoftwareKeyboardCont
} }
} }
) )

View File

@ -860,12 +860,12 @@ class ConversationInfoActivity :
val bundle = Bundle() val bundle = Bundle()
val existingParticipants = ArrayList<AutocompleteUser>() val existingParticipants = ArrayList<AutocompleteUser>()
for (userItem in userItems) { for (userItem in userItems) {
val user = AutocompleteUser( val user = AutocompleteUser(
userItem.model.calculatedActorId!!, userItem.model.calculatedActorId!!,
userItem.model.displayName, userItem.model.displayName,
userItem.model.calculatedActorType.name.lowercase() userItem.model.calculatedActorType.name.lowercase()
) )
existingParticipants.add(user) existingParticipants.add(user)
} }
bundle.putBoolean(BundleKeys.KEY_ADD_PARTICIPANTS, true) bundle.putBoolean(BundleKeys.KEY_ADD_PARTICIPANTS, true)