From d29fc9f2d343f93c5a8c586743abd6a637ce54e7 Mon Sep 17 00:00:00 2001
From: Maxime Naturel <maxime.naturel@niji.fr>
Date: Fri, 18 Feb 2022 17:04:02 +0100
Subject: [PATCH] Replacing vctr_unread_room_badge by vctr_content_secondary

---
 library/ui-styles/src/main/res/values/colors.xml             | 5 -----
 library/ui-styles/src/main/res/values/theme_black.xml        | 1 -
 library/ui-styles/src/main/res/values/theme_dark.xml         | 1 -
 library/ui-styles/src/main/res/values/theme_light.xml        | 1 -
 .../java/im/vector/app/features/home/HomeDetailFragment.kt   | 2 +-
 vector/src/main/res/drawable/bg_unread_notification.xml      | 4 ++--
 6 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/library/ui-styles/src/main/res/values/colors.xml b/library/ui-styles/src/main/res/values/colors.xml
index 48ac48a8ca..770b001893 100644
--- a/library/ui-styles/src/main/res/values/colors.xml
+++ b/library/ui-styles/src/main/res/values/colors.xml
@@ -57,11 +57,6 @@
     <attr name="vctr_list_separator_on_surface" format="color" />
 
     <!-- Other colors, which are not in the palette -->
-    <attr name="vctr_unread_room_badge" format="color" />
-    <color name="vctr_unread_room_badge_light">@color/palette_gray_200</color>
-    <color name="vctr_unread_room_badge_dark">@color/palette_gray_250</color>
-    <color name="vctr_unread_room_badge_black">@color/palette_gray_250</color>
-
     <attr name="vctr_fab_label_bg" format="color" />
     <color name="vctr_fab_label_bg_light">@android:color/white</color>
     <color name="vctr_fab_label_bg_dark">#FF181B21</color>
diff --git a/library/ui-styles/src/main/res/values/theme_black.xml b/library/ui-styles/src/main/res/values/theme_black.xml
index c472a4fae5..44d4206d43 100644
--- a/library/ui-styles/src/main/res/values/theme_black.xml
+++ b/library/ui-styles/src/main/res/values/theme_black.xml
@@ -7,7 +7,6 @@
         <!-- Only setting the items we need to override to get the background to be pure black, otherwise inheriting -->
 
         <!-- other colors -->
-        <item name="vctr_unread_room_badge">@color/vctr_unread_room_badge_black</item>
         <item name="vctr_fab_label_bg">@color/vctr_fab_label_bg_black</item>
         <item name="vctr_fab_label_stroke">@color/vctr_fab_label_stroke_black</item>
         <item name="vctr_fab_label_color">@color/vctr_fab_label_color_black</item>
diff --git a/library/ui-styles/src/main/res/values/theme_dark.xml b/library/ui-styles/src/main/res/values/theme_dark.xml
index b1d95c5439..100a07f41d 100644
--- a/library/ui-styles/src/main/res/values/theme_dark.xml
+++ b/library/ui-styles/src/main/res/values/theme_dark.xml
@@ -16,7 +16,6 @@
         <item name="vctr_system">@color/element_system_dark</item>
 
         <!-- other colors -->
-        <item name="vctr_unread_room_badge">@color/vctr_unread_room_badge_dark</item>
         <item name="vctr_fab_label_bg">@color/vctr_fab_label_bg_dark</item>
         <item name="vctr_fab_label_stroke">@color/vctr_fab_label_stroke_dark</item>
         <item name="vctr_fab_label_color">@color/vctr_fab_label_color_dark</item>
diff --git a/library/ui-styles/src/main/res/values/theme_light.xml b/library/ui-styles/src/main/res/values/theme_light.xml
index dba39c97ca..39e78ee5b1 100644
--- a/library/ui-styles/src/main/res/values/theme_light.xml
+++ b/library/ui-styles/src/main/res/values/theme_light.xml
@@ -16,7 +16,6 @@
         <item name="vctr_system">@color/element_system_light</item>
 
         <!-- other colors -->
-        <item name="vctr_unread_room_badge">@color/vctr_unread_room_badge_light</item>
         <item name="vctr_fab_label_bg">@color/vctr_fab_label_bg_light</item>
         <item name="vctr_fab_label_stroke">@color/vctr_fab_label_stroke_light</item>
         <item name="vctr_fab_label_color">@color/vctr_fab_label_color_light</item>
diff --git a/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt b/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt
index a07409d063..ea03b833ac 100644
--- a/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt
@@ -457,7 +457,7 @@ class HomeDetailFragment @Inject constructor(
         backgroundColor = if (highlight) {
             ThemeUtils.getColor(requireContext(), R.attr.colorError)
         } else {
-            ThemeUtils.getColor(requireContext(), R.attr.vctr_unread_room_badge)
+            ThemeUtils.getColor(requireContext(), R.attr.vctr_content_secondary)
         }
     }
 
diff --git a/vector/src/main/res/drawable/bg_unread_notification.xml b/vector/src/main/res/drawable/bg_unread_notification.xml
index 7c9ea18eec..4926f588da 100644
--- a/vector/src/main/res/drawable/bg_unread_notification.xml
+++ b/vector/src/main/res/drawable/bg_unread_notification.xml
@@ -4,5 +4,5 @@
 
     <corners android:radius="40dp" />
 
-    <solid android:color="?vctr_unread_room_badge" />
-</shape>
\ No newline at end of file
+    <solid android:color="?vctr_content_secondary" />
+</shape>