mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Do not notify early contacts list after first time
This commit is contained in:
parent
ddcd7d7dc1
commit
44009cfd92
1 changed files with 4 additions and 1 deletions
|
|
@ -66,6 +66,8 @@ class ContactsListViewModel @UiThread constructor() : AbstractTopBarViewModel()
|
|||
|
||||
private lateinit var magicSearch: MagicSearch
|
||||
|
||||
private var firstLoad = true
|
||||
|
||||
private val magicSearchListener = object : MagicSearchListenerStub() {
|
||||
@WorkerThread
|
||||
override fun onSearchResultsReceived(magicSearch: MagicSearch) {
|
||||
|
|
@ -232,7 +234,7 @@ class ContactsListViewModel @UiThread constructor() : AbstractTopBarViewModel()
|
|||
favouritesList.add(model)
|
||||
}
|
||||
|
||||
if (count == 20) {
|
||||
if (firstLoad && count == 20) {
|
||||
contactsList.postValue(list)
|
||||
fetchInProgress.postValue(false)
|
||||
}
|
||||
|
|
@ -251,5 +253,6 @@ class ContactsListViewModel @UiThread constructor() : AbstractTopBarViewModel()
|
|||
fetchInProgress.postValue(false)
|
||||
|
||||
Log.i("$TAG Processed [${results.size}] results")
|
||||
firstLoad = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue