diff --git a/vector/src/main/java/im/vector/app/core/extensions/Context.kt b/vector/src/main/java/im/vector/app/core/extensions/Context.kt index 8407d691a69..1063d30a415 100644 --- a/vector/src/main/java/im/vector/app/core/extensions/Context.kt +++ b/vector/src/main/java/im/vector/app/core/extensions/Context.kt @@ -35,7 +35,10 @@ fun Context.getResTintedDrawable(@DrawableRes drawableRes: Int, @ColorRes tint: return getTintedDrawable(drawableRes, ContextCompat.getColor(this, tint), alpha) } -fun Context.getTintedDrawable(@DrawableRes drawableRes: Int, @ColorInt tint: Int, @FloatRange(from = 0.0, to = 1.0) alpha: Float = 1f) = ContextCompat.getDrawable(this, drawableRes) +fun Context.getTintedDrawable(@DrawableRes drawableRes: Int, + @ColorInt tint: Int, + @FloatRange(from = 0.0, to = 1.0) alpha: Float = 1f +) = ContextCompat.getDrawable(this, drawableRes) ?.mutate() ?.also { drawable -> drawable.setTint(tint)