Remove unused code

This commit is contained in:
J-Jamet
2021-03-06 11:08:03 +01:00
parent 42e2a49af6
commit ebf92b1103

View File

@@ -159,20 +159,18 @@ class IconDrawableFactory(private val retrieveCipherKey : () -> Database.LoadedK
CoroutineScope(Dispatchers.IO).launch {
addToCache(context.resources, icon)
withContext(Dispatchers.Main) {
IconPackChooser.getSelectedIconPack(context)?.let { selectedIconPack ->
val superDrawable = getIconSuperDrawable(context,
icon,
imageView.width,
tintColor)
imageView.setImageDrawable(superDrawable.drawable)
if (superDrawable.tintable && selectedIconPack.tintable()) {
if (superDrawable.tintable) {
ImageViewCompat.setImageTintList(imageView, ColorStateList.valueOf(tintColor))
} else {
ImageViewCompat.setImageTintList(imageView, null)
}
}
}
}
} catch (e: Exception) {
Log.e(ImageView::class.java.name, "Unable to assign icon in image view", e)
}