Clear glide cache when fetching contacts to be able to show new contact avatar
This commit is contained in:
parent
b047ebae13
commit
a93f337e89
1 changed files with 4 additions and 0 deletions
|
@ -23,6 +23,7 @@ import android.content.Context
|
|||
import android.database.Cursor
|
||||
import android.os.AsyncTask
|
||||
import android.provider.ContactsContract
|
||||
import com.bumptech.glide.Glide
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
import org.linphone.LinphoneApplication.Companion.corePreferences
|
||||
import org.linphone.core.*
|
||||
|
@ -103,6 +104,9 @@ class AsyncContactsLoader(private val context: Context) :
|
|||
}
|
||||
|
||||
if (PermissionHelper.required(context).hasReadContactsPermission()) {
|
||||
// Clear Glide cache to be able to display new contact avatars
|
||||
Glide.get(context).clearDiskCache()
|
||||
|
||||
var selection: String? = null
|
||||
if (corePreferences.fetchContactsFromDefaultDirectory) {
|
||||
Log.i("[Contacts Loader] Only fetching contacts in default directory")
|
||||
|
|
Loading…
Reference in a new issue