mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Fixed issue when calling coreContext.fetchContacts() again
This commit is contained in:
parent
b5ba459343
commit
9462adee51
2 changed files with 4 additions and 2 deletions
|
|
@ -224,10 +224,11 @@ class ContactLoader : LoaderManager.LoaderCallbacks<Cursor> {
|
|||
for (friend in friendsList) {
|
||||
fl.addLocalFriend(friend)
|
||||
}
|
||||
Log.i("[Contacts Loader] Friends added")
|
||||
|
||||
fl.updateSubscriptions()
|
||||
Log.i("[Contacts Loader] Subscription(s) updated")
|
||||
|
||||
Log.i("[Contacts Loader] Friends added & subscription updated")
|
||||
coreContext.contactsManager.fetchFinished()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -438,7 +438,8 @@ class CoreContext(val context: Context, coreConfig: Config) : LifecycleOwner, Vi
|
|||
fun fetchContacts() {
|
||||
if (PermissionHelper.required(context).hasReadContactsPermission()) {
|
||||
Log.i("[Context] Init contacts loader")
|
||||
LoaderManager.getInstance(this@CoreContext).initLoader(0, null, contactLoader)
|
||||
val manager = LoaderManager.getInstance(this@CoreContext)
|
||||
manager.restartLoader(0, null, contactLoader)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue