mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 14:05:40 +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.models.json.conversations.RoomOverall
|
||||||
import com.nextcloud.talk.users.UserManager
|
import com.nextcloud.talk.users.UserManager
|
||||||
import com.nextcloud.talk.utils.ApiUtils
|
import com.nextcloud.talk.utils.ApiUtils
|
||||||
|
import com.nextcloud.talk.utils.ContactUtils
|
||||||
|
|
||||||
class ContactsRepositoryImpl(
|
class ContactsRepositoryImpl(
|
||||||
private val ncApiCoroutines: NcApiCoroutines,
|
private val ncApiCoroutines: NcApiCoroutines,
|
||||||
|
@ -29,8 +30,9 @@ class ContactsRepositoryImpl(
|
||||||
currentUser.baseUrl!!,
|
currentUser.baseUrl!!,
|
||||||
searchQuery
|
searchQuery
|
||||||
)
|
)
|
||||||
|
|
||||||
val modifiedQueryMap: HashMap<String, Any> = HashMap(retrofitBucket.queryMap)
|
val modifiedQueryMap: HashMap<String, Any> = HashMap(retrofitBucket.queryMap)
|
||||||
modifiedQueryMap["limit"] = 50
|
modifiedQueryMap["limit"] = ContactUtils.MAX_CONTACT_LIMIT
|
||||||
modifiedQueryMap["shareTypes[]"] = shareTypes
|
modifiedQueryMap["shareTypes[]"] = shareTypes
|
||||||
val response = ncApiCoroutines.getContactsWithSearchParam(
|
val response = ncApiCoroutines.getContactsWithSearchParam(
|
||||||
credentials,
|
credentials,
|
||||||
|
|
|
@ -11,6 +11,8 @@ import android.provider.ContactsContract
|
||||||
|
|
||||||
object ContactUtils {
|
object ContactUtils {
|
||||||
|
|
||||||
|
val MAX_CONTACT_LIMIT = 50
|
||||||
|
|
||||||
fun getDisplayNameFromDeviceContact(context: Context, id: String?): String? {
|
fun getDisplayNameFromDeviceContact(context: Context, id: String?): String? {
|
||||||
var displayName: String? = null
|
var displayName: String? = null
|
||||||
val whereName =
|
val whereName =
|
||||||
|
|
Loading…
Reference in a new issue