Loading packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/BundleHeader.kt +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ private fun ContentScope.BundleHeaderContent( ExpansionControl( collapsed = collapsed, hasUnread = viewModel.hasUnreadMessages, numberToShow = viewModel.numberOfChildren, modifier = Modifier.padding(start = 8.dp, end = 16.dp), ) Loading packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/NotificationRowPrimitives.kt +13 −25 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ object NotificationRowPrimitives { object Values { val ChevronRotation = ValueKey("NotificationChevronRotation") val PillBackgroundColor = ValueKey("PillBackgroundColor") } } Loading Loading @@ -120,16 +119,14 @@ fun PreviewIcon(drawable: Drawable, modifier: Modifier = Modifier) { @Composable fun ContentScope.ExpansionControl( collapsed: Boolean, hasUnread: Boolean, numberToShow: Int?, modifier: Modifier = Modifier, ) { val textColor = if (hasUnread) MaterialTheme.colorScheme.onTertiary else MaterialTheme.colorScheme.onSurface val textColor = MaterialTheme.colorScheme.onSurface Box(modifier = modifier) { // The background is a shared Element and therefore can't be the parent of a different // shared Element (the chevron), otherwise the child can't be animated. PillBackground(hasUnread, modifier = Modifier.matchParentSize()) PillBackground(modifier = Modifier.matchParentSize()) Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(vertical = 2.dp, horizontal = 6.dp), Loading @@ -150,15 +147,8 @@ fun ContentScope.ExpansionControl( } @Composable private fun ContentScope.PillBackground(hasUnread: Boolean, modifier: Modifier = Modifier) { ElementWithValues(NotificationRowPrimitives.Elements.PillBackground, modifier) { val bgColorNoUnread = notificationElementSurfaceColor() val surfaceColor by animateElementColorAsState( if (hasUnread) MaterialTheme.colorScheme.tertiary else bgColorNoUnread, NotificationRowPrimitives.Values.PillBackgroundColor, ) content { private fun ContentScope.PillBackground(modifier: Modifier = Modifier) { val surfaceColor = notificationElementSurfaceColor() Box( modifier = Modifier.drawBehind { Loading @@ -169,8 +159,6 @@ private fun ContentScope.PillBackground(hasUnread: Boolean, modifier: Modifier = } ) } } } @Composable @ReadOnlyComposable Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/row/data/repository/BundleRepository.kt +0 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,5 @@ class BundleRepository(@StringRes val titleTextResId: Int, @DrawableRes val bund var numberOfChildren by mutableStateOf<Int?>(0) var hasUnreadMessages by mutableStateOf(false) var previewIcons by mutableStateOf(listOf<Drawable>()) } packages/SystemUI/src/com/android/systemui/statusbar/notification/row/domain/interactor/BundleInteractor.kt +0 −7 Original line number Diff line number Diff line Loading @@ -27,16 +27,9 @@ class BundleInteractor(private val repository: BundleRepository) { val numberOfChildren get() = repository.numberOfChildren val hasUnreadMessages get() = repository.hasUnreadMessages val bundleIcon get() = repository.bundleIcon val previewIcons get() = repository.previewIcons fun rowExpanded() { repository.hasUnreadMessages = false } } packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/BundleHeaderViewModel.kt +1 −7 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ class BundleHeaderViewModel(val interactor: BundleInteractor) { val numberOfChildren get() = interactor.numberOfChildren val hasUnreadMessages get() = interactor.hasUnreadMessages val bundleIcon get() = interactor.bundleIcon Loading Loading @@ -71,10 +68,7 @@ class BundleHeaderViewModel(val interactor: BundleInteractor) { fun onHeaderClicked(scope: CoroutineScope) { val targetScene = when (state.currentScene) { BundleHeader.Scenes.Collapsed -> { interactor.rowExpanded() BundleHeader.Scenes.Expanded } BundleHeader.Scenes.Collapsed -> BundleHeader.Scenes.Expanded BundleHeader.Scenes.Expanded -> BundleHeader.Scenes.Collapsed else -> error("Unknown Scene") } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/BundleHeader.kt +0 −1 Original line number Diff line number Diff line Loading @@ -170,7 +170,6 @@ private fun ContentScope.BundleHeaderContent( ExpansionControl( collapsed = collapsed, hasUnread = viewModel.hasUnreadMessages, numberToShow = viewModel.numberOfChildren, modifier = Modifier.padding(start = 8.dp, end = 16.dp), ) Loading
packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/row/NotificationRowPrimitives.kt +13 −25 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ object NotificationRowPrimitives { object Values { val ChevronRotation = ValueKey("NotificationChevronRotation") val PillBackgroundColor = ValueKey("PillBackgroundColor") } } Loading Loading @@ -120,16 +119,14 @@ fun PreviewIcon(drawable: Drawable, modifier: Modifier = Modifier) { @Composable fun ContentScope.ExpansionControl( collapsed: Boolean, hasUnread: Boolean, numberToShow: Int?, modifier: Modifier = Modifier, ) { val textColor = if (hasUnread) MaterialTheme.colorScheme.onTertiary else MaterialTheme.colorScheme.onSurface val textColor = MaterialTheme.colorScheme.onSurface Box(modifier = modifier) { // The background is a shared Element and therefore can't be the parent of a different // shared Element (the chevron), otherwise the child can't be animated. PillBackground(hasUnread, modifier = Modifier.matchParentSize()) PillBackground(modifier = Modifier.matchParentSize()) Row( verticalAlignment = Alignment.CenterVertically, modifier = Modifier.padding(vertical = 2.dp, horizontal = 6.dp), Loading @@ -150,15 +147,8 @@ fun ContentScope.ExpansionControl( } @Composable private fun ContentScope.PillBackground(hasUnread: Boolean, modifier: Modifier = Modifier) { ElementWithValues(NotificationRowPrimitives.Elements.PillBackground, modifier) { val bgColorNoUnread = notificationElementSurfaceColor() val surfaceColor by animateElementColorAsState( if (hasUnread) MaterialTheme.colorScheme.tertiary else bgColorNoUnread, NotificationRowPrimitives.Values.PillBackgroundColor, ) content { private fun ContentScope.PillBackground(modifier: Modifier = Modifier) { val surfaceColor = notificationElementSurfaceColor() Box( modifier = Modifier.drawBehind { Loading @@ -169,8 +159,6 @@ private fun ContentScope.PillBackground(hasUnread: Boolean, modifier: Modifier = } ) } } } @Composable @ReadOnlyComposable Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/data/repository/BundleRepository.kt +0 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,5 @@ class BundleRepository(@StringRes val titleTextResId: Int, @DrawableRes val bund var numberOfChildren by mutableStateOf<Int?>(0) var hasUnreadMessages by mutableStateOf(false) var previewIcons by mutableStateOf(listOf<Drawable>()) }
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/domain/interactor/BundleInteractor.kt +0 −7 Original line number Diff line number Diff line Loading @@ -27,16 +27,9 @@ class BundleInteractor(private val repository: BundleRepository) { val numberOfChildren get() = repository.numberOfChildren val hasUnreadMessages get() = repository.hasUnreadMessages val bundleIcon get() = repository.bundleIcon val previewIcons get() = repository.previewIcons fun rowExpanded() { repository.hasUnreadMessages = false } }
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ui/viewmodel/BundleHeaderViewModel.kt +1 −7 Original line number Diff line number Diff line Loading @@ -38,9 +38,6 @@ class BundleHeaderViewModel(val interactor: BundleInteractor) { val numberOfChildren get() = interactor.numberOfChildren val hasUnreadMessages get() = interactor.hasUnreadMessages val bundleIcon get() = interactor.bundleIcon Loading Loading @@ -71,10 +68,7 @@ class BundleHeaderViewModel(val interactor: BundleInteractor) { fun onHeaderClicked(scope: CoroutineScope) { val targetScene = when (state.currentScene) { BundleHeader.Scenes.Collapsed -> { interactor.rowExpanded() BundleHeader.Scenes.Expanded } BundleHeader.Scenes.Collapsed -> BundleHeader.Scenes.Expanded BundleHeader.Scenes.Expanded -> BundleHeader.Scenes.Collapsed else -> error("Unknown Scene") } Loading