mirror of
https://github.com/element-hq/element-android
synced 2024-11-25 02:45:37 +03:00
Do not load user icon before Android Pie
This commit is contained in:
parent
8c86a653b2
commit
568e8c8bc0
1 changed files with 3 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
|||
package im.vector.riotx.features.notifications
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.os.Handler
|
||||
import android.os.HandlerThread
|
||||
import androidx.annotation.WorkerThread
|
||||
|
@ -56,9 +57,10 @@ class IconLoader(val context: Context,
|
|||
/**
|
||||
* Get icon of a user.
|
||||
* If already in cache, use it, else load it and call IconLoaderListener.onIconsLoaded() when ready
|
||||
* Before Android P, this does nothing because the icon won't be used
|
||||
*/
|
||||
fun getUserIcon(path: String?): IconCompat? {
|
||||
if (path == null) {
|
||||
if (path == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue