Make FooterViewModel children hold flows.
Instead of the parent view holding a flow of the child view, it makes more sense for the child view to hold a flow of the visibility instead. That way we're not triggering updates unnecessarily. The footer view already knows to ignore duplicate updates for fields, but if we can avoid triggering a downstream listener that's a small win for performance. Plus it avoids holding constant values in a flow unnecessarily. Bug: 293167744 Test: manual + FooterViewModelTest Flag: ACONFIG com.systemui.notifications_footer_refactor_flag DEVELOPMENT Change-Id: Ic512b2fbdeb1d99c4aeeab1500221ae17d3e1087
Loading
Please register or sign in to comment