mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
Refactoring
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
bb46b6adad
commit
dc11254149
@ -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,
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user