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,17 +159,15 @@ class IconDrawableFactory(private val retrieveCipherKey : () -> Database.LoadedK
CoroutineScope(Dispatchers.IO).launch { CoroutineScope(Dispatchers.IO).launch {
addToCache(context.resources, icon) addToCache(context.resources, icon)
withContext(Dispatchers.Main) { withContext(Dispatchers.Main) {
IconPackChooser.getSelectedIconPack(context)?.let { selectedIconPack -> val superDrawable = getIconSuperDrawable(context,
val superDrawable = getIconSuperDrawable(context, icon,
icon, imageView.width,
imageView.width, tintColor)
tintColor) imageView.setImageDrawable(superDrawable.drawable)
imageView.setImageDrawable(superDrawable.drawable) if (superDrawable.tintable) {
if (superDrawable.tintable && selectedIconPack.tintable()) { ImageViewCompat.setImageTintList(imageView, ColorStateList.valueOf(tintColor))
ImageViewCompat.setImageTintList(imageView, ColorStateList.valueOf(tintColor)) } else {
} else { ImageViewCompat.setImageTintList(imageView, null)
ImageViewCompat.setImageTintList(imageView, null)
}
} }
} }
} }