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

Commit 76f70174 authored by bobyang's avatar bobyang
Browse files

Hide the suggested chip until the text is ready.

Video:https://drive.google.com/file/d/1lFJ22tNcgRlYqDmlh1CXUBVXWEeDx8_y/view?usp=sharing&resourcekey=0-1zvxKjOIFNQm4-kVKJfy4Q
Bug: 412547250
Flag: EXEMPT refactor
Test: Tested by building and installing picker on local, checking if the
suggested chip can be hidden as expected.

Change-Id: Icbcc5ca156c2b3c53f03c7480e50a8010d290df2
parent ca472db4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wallpaper.customization.ui.binder

import android.content.Intent
import android.view.View
import androidx.core.graphics.drawable.DrawableCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
@@ -64,6 +65,10 @@ class ThemePickerSuggestedEntryBinder @Inject constructor() : PackThemeSuggested
                }
                launch {
                    optionsViewModel.packThemeViewModel.packThemeData.collect { packThemeData ->
                        if (packThemeData.suggestedChipThemePackInfo.title.isNotEmpty()) {
                            view.visibility = View.VISIBLE
                            view.hideSuggestedChip = false
                        }
                        view.suggestedChipText.text = packThemeData.suggestedChipThemePackInfo.title
                    }
                }