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 { 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 && selectedIconPack.tintable()) { if (superDrawable.tintable) {
ImageViewCompat.setImageTintList(imageView, ColorStateList.valueOf(tintColor)) ImageViewCompat.setImageTintList(imageView, ColorStateList.valueOf(tintColor))
} else { } else {
ImageViewCompat.setImageTintList(imageView, null) ImageViewCompat.setImageTintList(imageView, null)
} }
} }
} }
}
} catch (e: Exception) { } catch (e: Exception) {
Log.e(ImageView::class.java.name, "Unable to assign icon in image view", e) Log.e(ImageView::class.java.name, "Unable to assign icon in image view", e)
} }