Refactoring

Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
sowjanyakch 2024-07-19 13:16:03 +02:00
parent bb46b6adad
commit dc11254149
No known key found for this signature in database
GPG key ID: F7AA2A8B65B50220
2 changed files with 5 additions and 1 deletions

View file

@ -14,6 +14,7 @@ import com.nextcloud.talk.models.json.autocomplete.AutocompleteOverall
import com.nextcloud.talk.models.json.conversations.RoomOverall
import com.nextcloud.talk.users.UserManager
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.ContactUtils
class ContactsRepositoryImpl(
private val ncApiCoroutines: NcApiCoroutines,
@ -29,8 +30,9 @@ class ContactsRepositoryImpl(
currentUser.baseUrl!!,
searchQuery
)
val modifiedQueryMap: HashMap<String, Any> = HashMap(retrofitBucket.queryMap)
modifiedQueryMap["limit"] = 50
modifiedQueryMap["limit"] = ContactUtils.MAX_CONTACT_LIMIT
modifiedQueryMap["shareTypes[]"] = shareTypes
val response = ncApiCoroutines.getContactsWithSearchParam(
credentials,

View file

@ -11,6 +11,8 @@ import android.provider.ContactsContract
object ContactUtils {
val MAX_CONTACT_LIMIT = 50
fun getDisplayNameFromDeviceContact(context: Context, id: String?): String? {
var displayName: String? = null
val whereName =