Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f02ec5da authored by Hasib Prince's avatar Hasib Prince
Browse files

fixed: category icon color for dark mode

parent 0819036a
Loading
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1042,7 +1042,7 @@ class FusedAPIImpl @Inject constructor(
        app: Category
    ) {
        category.drawable =
            getCategoryIconResource(app.type, getCategoryIconName(category))
            getCategoryIconResource(getCategoryIconName(category))
    }

    private fun getCategoryIconName(category: FusedCategory): String {
@@ -1099,17 +1099,13 @@ class FusedAPIImpl @Inject constructor(
        return FusedCategory(
            id = category,
            title = getCategoryTitle(category, categories),
            drawable = getCategoryIconResource(appType, category),
            drawable = getCategoryIconResource(category),
            tag = tag
        )
    }

    private fun getCategoryIconResource(appType: Category.Type, category: String): Int {
        return if (appType == Category.Type.APPLICATION) {
            CategoryUtils.provideAppsCategoryIconResource(category)
        } else {
            CategoryUtils.provideGamesCategoryIconResource(category)
        }
    private fun getCategoryIconResource(category: String): Int {
        return CategoryUtils.provideAppsCategoryIconResource(category)
    }

    private fun getCategoryTitle(category: String, categories: Categories): String {
+0 −43
Original line number Diff line number Diff line
@@ -175,47 +175,4 @@ object CategoryUtils {
                R.drawable.ic_cat_default
        }
    }

    fun provideGamesCategoryIconResource(categoryId: String): Int {
        return when (categoryId) {
            "action" ->
                R.drawable.ic_action
            "adventure" ->
                R.drawable.ic_adventure
            "arcade" ->
                R.drawable.ic_arcade
            "board" ->
                R.drawable.ic_board
            "card" ->
                R.drawable.ic_card
            "casino" ->
                R.drawable.ic_casino
            "casual" ->
                R.drawable.ic_casual
            "educational" ->
                R.drawable.ic_educational
            "music" ->
                R.drawable.ic_music
            "game_open_games", "web_games" ->
                R.drawable.ic_arcade
            "puzzle" ->
                R.drawable.ic_puzzle
            "racing" ->
                R.drawable.ic_racing
            "role_playing" ->
                R.drawable.ic_role_playing
            "simulation" ->
                R.drawable.ic_simulation
            "sports" ->
                R.drawable.ic_sports
            "strategy" ->
                R.drawable.ic_strategy
            "trivia" ->
                R.drawable.ic_trivia
            "word" ->
                R.drawable.ic_word
            else ->
                R.drawable.ic_cat_default
        }
    }
}
−3.44 KiB
Loading image diff...
+0 −38
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="32dp"
    android:height="32dp"
    android:viewportWidth="32"
    android:viewportHeight="32">
  <group>
    <clip-path
        android:pathData="M1.2571,4.6858h29.4857v22.6286h-29.4857z"/>
    <path
        android:pathData="M15.8571,26.2857C15.4857,26.2857 15.1143,26.0857 14.9428,25.7143C14.7143,25.2286 14.9143,24.6286 15.4285,24.3714L19.3428,22.5143L16.7714,20.2C16.1714,19.7143 15.8285,18.9714 15.8285,18.0857C15.8285,17.3143 16.1428,16.6 16.7143,16.0286L21.5143,11.2571C21.7143,11.0571 21.9714,10.9714 22.2285,10.9714C22.4857,10.9714 22.7428,11.0857 22.9428,11.2857C23.3143,11.6857 24.1714,12.6571 24.2571,13.5143C24.2571,13.5429 24.2571,13.6 24.2571,13.6286V16.2286C24.2571,16.4286 24.3143,16.5143 24.4285,16.6C25.0285,17.1429 26.8571,17.1429 27.9428,17C28.4857,16.9143 29,17.2857 29.0857,17.8571C29.1714,18.4 28.8,18.9143 28.2285,19C27.6285,19.0857 24.6285,19.4571 23.1143,18.1429C22.5428,17.6571 22.2571,17 22.2571,16.2572V13.7429C22.2285,13.6857 22.2,13.6 22.1143,13.4857L18.1143,17.4857C17.9143,17.6857 17.8285,17.8857 17.8285,18.1429C17.8285,18.2571 17.8571,18.5714 18,18.6857C18.0285,18.7143 18.0571,18.7143 18.0571,18.7429L21.7714,22.0857C22.0285,22.3143 22.1428,22.6286 22.0857,22.9714C22.0285,23.3143 21.8285,23.6 21.5143,23.7429L16.2285,26.2286C16.1428,26.2572 16,26.2857 15.8571,26.2857Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M19.7429,22.6859C19.5143,22.6859 19.2572,22.6001 19.0857,22.4287L15.0572,18.8001C14.5429,18.4287 14.1429,18.0001 14.1429,17.0287C14.1429,16.143 14.8,15.4858 15.2857,15.0001L18.9143,11.3716C19.4,10.7716 20.1429,10.4573 21.0286,10.4573C21.5143,10.4573 22.6857,10.6573 22.8857,12.4287C22.9429,12.9716 22.5429,13.4858 22,13.543C21.4572,13.6001 20.9429,13.2001 20.8857,12.6573C20.8857,12.5716 20.8572,12.5144 20.8572,12.4573C20.7143,12.4858 20.5714,12.5144 20.4857,12.6287C20.4572,12.6573 20.4286,12.7144 20.4,12.743L16.7143,16.4001C16.5429,16.5716 16.2286,16.8858 16.1714,17.0573C16.1714,17.0858 16.1714,17.1144 16.1714,17.1144C16.2286,17.143 16.2857,17.2001 16.3143,17.2287C16.3429,17.2573 16.3714,17.2573 16.3714,17.2858L20.4286,20.943C20.8286,21.3144 20.8572,21.943 20.4857,22.343C20.2857,22.5716 20.0286,22.6859 19.7429,22.6859Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M21.8857,12.6287C21.6,12.6287 21.3428,12.5144 21.1428,12.2858L18.3714,9.1715C17.2285,8.0572 15.0571,9.4001 15.0285,9.4001C14.5714,9.6858 13.9428,9.5715 13.6571,9.0858C13.3714,8.6287 13.4857,8.0001 13.9428,7.7144C15.2571,6.8572 17.9714,5.9429 19.8,7.7715L19.8285,7.8001L22.6285,10.9429C23,11.3429 22.9714,12.0001 22.5428,12.3429C22.3714,12.5429 22.1428,12.6287 21.8857,12.6287Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M14.2,20.7715L13.3143,19.9143L6.1429,26.3143L14.2,20.7715Z"
        android:fillColor="#0088ED"
        android:fillType="evenOdd"/>
    <path
        android:pathData="M6.1429,27.3143C5.8572,27.3143 5.5429,27.1714 5.3429,26.9428C5.0286,26.5143 5.0571,25.9428 5.4571,25.5714L12.6,19.1428C13,18.8 13.6,18.8 13.9714,19.1714L14.8572,20.0571C15.0572,20.2571 15.1714,20.5714 15.1429,20.8571C15.1143,21.1428 14.9714,21.4286 14.7143,21.6L6.7143,27.1428C6.5429,27.2571 6.3429,27.3143 6.1429,27.3143Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M26.9714,12.2286C24.8857,12.2286 23.2,10.5429 23.2,8.4572C23.2,6.3715 24.8857,4.6858 26.9714,4.6858C29.0571,4.6858 30.7428,6.3715 30.7428,8.4572C30.7428,10.5429 29.0571,12.2286 26.9714,12.2286ZM26.9714,6.6858C26,6.6858 25.2,7.4858 25.2,8.4572C25.2,9.4286 26,10.2286 26.9714,10.2286C27.9428,10.2286 28.7428,9.4286 28.7428,8.4572C28.7428,7.4858 27.9428,6.6858 26.9714,6.6858Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M11.8,12.9714H4.9428C4.4,12.9714 3.9428,12.5143 3.9428,11.9714C3.9428,11.4286 4.4,10.9714 4.9428,10.9714H11.8C12.3428,10.9714 12.8,11.4286 12.8,11.9714C12.8,12.5143 12.3428,12.9714 11.8,12.9714Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M8.1428,17.3716H3.6571C3.1143,17.3716 2.6571,16.9144 2.6571,16.3716C2.6571,15.8287 3.1143,15.3716 3.6571,15.3716H8.1428C8.6857,15.3716 9.1428,15.8287 9.1428,16.3716C9.1428,16.9144 8.7143,17.3716 8.1428,17.3716Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M4.5143,22.1428H2.2571C1.7143,22.1428 1.2571,21.6857 1.2571,21.1428C1.2571,20.6 1.7143,20.1428 2.2571,20.1428H4.5143C5.0571,20.1428 5.5143,20.6 5.5143,21.1428C5.5143,21.6857 5.0571,22.1428 4.5143,22.1428Z"
        android:fillColor="#0088ED"/>
  </group>
</vector>
+0 −40
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="32dp"
    android:height="32dp"
    android:viewportWidth="32"
    android:viewportHeight="32">
  <group>
    <clip-path
        android:pathData="M3.0714,3.0715h26.4571v26.2857h-26.4571z"/>
    <path
        android:pathData="M4.0715,29.3573C3.8143,29.3573 3.5572,29.2716 3.3572,29.0716C2.9572,28.6716 2.9572,28.043 3.3572,27.6716L8.3857,22.643C8.7858,22.243 9.4143,22.243 9.8143,22.643C10.2143,23.043 10.2143,23.6716 9.8143,24.043L4.7857,29.0716C4.5858,29.2716 4.3286,29.3573 4.0715,29.3573Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M12.7572,24.5858C12.5001,24.5858 12.2429,24.5001 12.0429,24.3001C11.6429,23.9001 11.6429,23.2715 12.0429,22.9001L27.3572,7.5858V5.0715H24.8429L9.5572,20.3858C9.1572,20.7858 8.5286,20.7858 8.1286,20.3858C7.7286,19.9858 7.7286,19.3572 8.1286,18.9858L23.7286,3.3572C23.9286,3.1572 24.1572,3.0715 24.4429,3.0715H28.3572C28.9001,3.0715 29.3572,3.5287 29.3572,4.0715V7.9858C29.3572,8.243 29.2429,8.5001 29.0715,8.7001L13.4715,24.3001C13.2715,24.5001 13.0144,24.5858 12.7572,24.5858Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M6.4429,18.9573C6.7,18.7001 7.1,18.7001 7.3571,18.9573L13.4714,25.0715C13.7286,25.3287 13.7286,25.7287 13.4714,25.9858C13.2143,26.243 12.8143,26.243 12.5571,25.9858L6.4429,19.8715C6.1857,19.643 6.1857,19.2144 6.4429,18.9573Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M13.0143,27.1857C12.5857,27.1857 12.1572,27.0143 11.8429,26.7L5.7286,20.5857C5.0715,19.9286 5.0715,18.9 5.7286,18.2429C6.3857,17.5857 7.4143,17.5857 8.0715,18.2429L14.1858,24.3571C14.8429,25.0143 14.8429,26.0429 14.1858,26.7C13.8429,27.0143 13.4429,27.1857 13.0143,27.1857Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M28.5286,29.3573C28.2715,29.3573 28.0143,29.2716 27.8143,29.0716L22.7857,24.0145C22.3857,23.6145 22.3857,22.9859 22.7857,22.6145C23.1857,22.2145 23.8143,22.2145 24.2143,22.6145L29.2429,27.643C29.6429,28.043 29.6429,28.6716 29.2429,29.043C29.0429,29.2716 28.7857,29.3573 28.5286,29.3573Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M23.5286,20.443C23.2715,20.443 23.0143,20.3573 22.8143,20.1573L21.6429,18.9859C21.2429,18.5859 21.2429,17.9573 21.6429,17.5859C22.0429,17.1859 22.6715,17.1859 23.0715,17.5859L24.2429,18.7573C24.6429,19.1573 24.6429,19.7859 24.2429,20.1573C24.0429,20.3573 23.7858,20.443 23.5286,20.443Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M19.6143,24.3573C19.3571,24.3573 19.1,24.2716 18.9,24.0716L17.7286,22.9002C17.3286,22.5002 17.3286,21.8716 17.7286,21.5002C18.1286,21.1002 18.7571,21.1002 19.1571,21.5002L20.3286,22.6716C20.7286,23.0716 20.7286,23.7002 20.3286,24.0716C20.1286,24.2716 19.8714,24.3573 19.6143,24.3573Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M9.8715,14.843C9.6143,14.843 9.3572,14.7287 9.1572,14.5287L3.5286,8.6715C3.3572,8.4715 3.2429,8.243 3.2429,7.9858V4.0715C3.2429,3.5287 3.6714,3.0715 4.2429,3.0715H8.1572C8.4429,3.0715 8.7,3.1858 8.8715,3.3858L14.5,9.2144C14.8714,9.6144 14.8714,10.243 14.4714,10.6144C14.0714,10.9858 13.4429,10.9858 13.0714,10.5858L7.7286,5.0715H5.2429V7.5858L10.5857,13.1287C10.9572,13.5287 10.9572,14.1572 10.5572,14.5287C10.3572,14.7287 10.1,14.843 9.8715,14.843Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M19.1286,25.9858C18.8714,25.7287 18.8714,25.3287 19.1286,25.0715L25.2428,18.9573C25.5,18.7001 25.9,18.7001 26.1571,18.9573C26.4143,19.2144 26.4143,19.6144 26.1571,19.8715L20.0428,25.9858C19.7857,26.243 19.3857,26.243 19.1286,25.9858Z"
        android:fillColor="#0088ED"/>
    <path
        android:pathData="M19.5857,27.1857C19.1572,27.1857 18.7286,27.0143 18.4143,26.7C17.7572,26.0429 17.7572,25.0143 18.4143,24.3571L24.5286,18.2429C25.1857,17.5857 26.2143,17.5857 26.8715,18.2429C27.5286,18.9 27.5286,19.9286 26.8715,20.5857L20.7572,26.7C20.4429,27.0143 20.0143,27.1857 19.5857,27.1857Z"
        android:fillColor="#0088ED"/>
  </group>
</vector>
Loading