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

Commit 6f32665f authored by Olivier St-Onge's avatar Olivier St-Onge
Browse files

Don't bounce the tile if it's the main click of a large dual target tile

These expand to a dialog, and the bounce animation is reserved for toggles

Test: manually
Flag: com.android.systemui.qs_ui_refactor_compose_fragment
Fixes: 410866850
Change-Id: I50da1b98c2d6fe9b55607c3030b412b8f6a19e9e
parent a39f5980
Loading
Loading
Loading
Loading
+6 −3
Original line number Original line Diff line number Diff line
@@ -230,10 +230,13 @@ fun Tile(
                            TileHapticsViewModel.TileInteractionState.CLICKED
                            TileHapticsViewModel.TileInteractionState.CLICKED
                        )
                        )
                        if (uiState.accessibilityUiState.toggleableState != null) {
                        if (uiState.accessibilityUiState.toggleableState != null) {
                            // Bounce
                            // Bounce unless we're a large dual target tile. These don't toggle on
                            // main click.
                            if (iconOnly || !isDualTarget) {
                                coroutineScope.launch {
                                coroutineScope.launch {
                                    currentBounceableInfo.bounceable.animateBounce()
                                    currentBounceableInfo.bounceable.animateBounce()
                                }
                                }
                            }
                            // And show footer text feedback for icons
                            // And show footer text feedback for icons
                            if (iconOnly) {
                            if (iconOnly) {
                                requestToggleTextFeedback(tile.spec)
                                requestToggleTextFeedback(tile.spec)