Merge "[User Switcher] Remove duplicate views." into tm-qpr-dev

This commit is contained in:
Aaron Liu
2022-11-15 18:00:42 +00:00
committed by Android (Google) Code Review

View File

@@ -133,7 +133,9 @@ object UserSwitcherViewBinder {
launch {
viewModel.users.collect { users ->
val viewPool =
view.children.filter { it.tag == USER_VIEW_TAG }.toMutableList()
gridContainerView.children
.filter { it.tag == USER_VIEW_TAG }
.toMutableList()
viewPool.forEach {
gridContainerView.removeView(it)
flowWidget.removeView(it)