commit | 34f1654bd45c3e382743f4da57d62ed255541da7 | [log] [tgz] |
---|---|---|
author | George Lin <giolin@google.com> | Fri Nov 17 16:06:21 2023 +0000 |
committer | George Lin <giolin@google.com> | Fri Nov 17 16:06:21 2023 +0000 |
tree | e26ea73ff7ef44a8b2abb15e1cc6f530cb7c0408 | |
parent | eef444cf57676751eabccba7d84b42f2f23e3685 [diff] |
Fix repetitive clock color options when onResume Clear all the views before we add option views. Test: Manually tested repetitive options no longer show Bug: 281954408 Flag: None Change-Id: Iaa6c9c7195198407b44ab3bc3bafaca4a2e42fce
diff --git a/src/com/android/customization/picker/clock/ui/binder/ClockSettingsBinder.kt b/src/com/android/customization/picker/clock/ui/binder/ClockSettingsBinder.kt index 0f39c54..d17cdf8 100644 --- a/src/com/android/customization/picker/clock/ui/binder/ClockSettingsBinder.kt +++ b/src/com/android/customization/picker/clock/ui/binder/ClockSettingsBinder.kt
@@ -141,6 +141,7 @@ launch { viewModel.colorOptions.collect { colorOptions -> + colorOptionContainerListView.removeAllViews() colorOptions.forEachIndexed { index, colorOption -> colorOption.payload?.let { payload -> val item =