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

Commit b7ed1781 authored by Yuri Lin's avatar Yuri Lin Committed by Android (Google) Code Review
Browse files

Merge "Replace long click handler with long click semantic indicator." into main

parents d4124d33 e9d46994
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import androidx.compose.ui.semantics.collapse
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.dismiss
import androidx.compose.ui.semantics.expand
import androidx.compose.ui.semantics.onLongClick
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
@@ -91,7 +92,6 @@ fun BundleHeader(
    viewModel: BundleHeaderViewModel,
    modifier: Modifier = Modifier,
    onHeaderClicked: () -> Unit = {},
    onHeaderLongClicked: () -> Unit = {},
    onA11yDismissAction: () -> Unit = {}, // only for dismissing via accessibility action
) {
    val state =
@@ -152,7 +152,6 @@ fun BundleHeader(
            modifier =
                Modifier.combinedClickable(
                        onClick = { toggle() },
                        onLongClick = { onHeaderLongClicked() },
                        interactionSource = null,
                        indication = null,
                    )
@@ -173,6 +172,9 @@ fun BundleHeader(
                            onA11yDismissAction()
                            true
                        }
                        // Do nothing. This is here to indicate that the BundleHeader is long
                        // clickable; the actual long click is handled by ExpandableNotificationRow.
                        onLongClick(action = null)
                    },
        ) {
            scene(BundleHeader.Scenes.Collapsed) {
+0 −1
Original line number Diff line number Diff line
@@ -187,7 +187,6 @@ private fun HeaderComposeViewContent(
        BundleHeader(
            viewModel,
            onHeaderClicked = { row.expandNotification() },
            onHeaderLongClicked = { row.performLongClick() },
            // to be used only for dismissal coming from an accessibility action.
            onA11yDismissAction = { row.performDismiss(true) },
        )