mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 05:55:39 +03:00
Refactoring
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
bb46b6adad
commit
dc11254149
2 changed files with 5 additions and 1 deletions
|
@ -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 a new issue