From 4a817fd9f56912c996008d15c7280f7310780c2e Mon Sep 17 00:00:00 2001 From: Maxime NATUREL Date: Wed, 20 Jul 2022 14:49:52 +0200 Subject: [PATCH] Fixing dark/light loading of the correct map drawable --- .../detail/timeline/item/DefaultLiveLocationShareStatusItem.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultLiveLocationShareStatusItem.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultLiveLocationShareStatusItem.kt index df114fe101..9a729caa31 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultLiveLocationShareStatusItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/DefaultLiveLocationShareStatusItem.kt @@ -19,6 +19,7 @@ package im.vector.app.features.home.room.detail.timeline.item import android.content.res.Resources import android.graphics.drawable.ColorDrawable import android.widget.ImageView +import androidx.core.content.ContextCompat import androidx.core.view.updateLayoutParams import com.bumptech.glide.load.MultiTransformation import com.bumptech.glide.load.resource.bitmap.CenterCrop @@ -52,7 +53,7 @@ class DefaultLiveLocationShareStatusItem : LiveLocationShareStatusItem { height = mapHeight } GlideApp.with(mapImageView) - .load(R.drawable.bg_no_location_map) + .load(ContextCompat.getDrawable(mapImageView.context, R.drawable.bg_no_location_map)) .transform(MultiTransformation(CenterCrop(), mapCornerTransformation)) .into(mapImageView) }