From 9dc0a36ca0a66acb3da8ef3676e0110eb5744faa Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Fri, 2 Sep 2022 16:11:43 +0200 Subject: [PATCH] Apply correct tint to inactive status drawable --- .../settings/devices/v2/list/OtherSessionsController.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsController.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsController.kt index c992505e37..8a5ee05af7 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsController.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/OtherSessionsController.kt @@ -21,6 +21,7 @@ import im.vector.app.R import im.vector.app.core.date.DateFormatKind import im.vector.app.core.date.VectorDateFormatter import im.vector.app.core.epoxy.noResultItem +import im.vector.app.core.resources.ColorProvider import im.vector.app.core.resources.DrawableProvider import im.vector.app.core.resources.StringProvider import im.vector.app.features.settings.devices.DeviceFullInfo @@ -31,6 +32,7 @@ class OtherSessionsController @Inject constructor( private val stringProvider: StringProvider, private val dateFormatter: VectorDateFormatter, private val drawableProvider: DrawableProvider, + private val colorProvider: ColorProvider, ) : TypedEpoxyController>() { override fun buildModels(data: List?) { @@ -57,7 +59,8 @@ class OtherSessionsController @Inject constructor( } else { stringProvider.getString(R.string.device_manager_other_sessions_description_unverified, formattedLastActivityDate) } - val descriptionDrawable = if (device.isInactive) drawableProvider.getDrawable(R.drawable.ic_inactive_sessions) else null + val drawableColor = colorProvider.getColorFromAttribute(R.attr.vctr_content_secondary) + val descriptionDrawable = if (device.isInactive) drawableProvider.getDrawable(R.drawable.ic_inactive_sessions, drawableColor) else null otherSessionItem { id(device.deviceInfo.deviceId)