mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Clear glide cache when fetching contacts to be able to show new contact avatar
This commit is contained in:
parent
db198c3e43
commit
bc41401a8c
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…
Add table
Reference in a new issue