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

Commit 808573df authored by pajacechen's avatar pajacechen
Browse files

Add onClick for CardPreference

Bug: 326518399
Test: Manual Test
Change-Id: Id56e53cff43d14090ec8c08704a207fd9c829c1d
parent 94c7bd7e
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -61,6 +61,9 @@ constructor(
    /** The visibility of secondary button on tips card. The default value is `false`. */
    var secondaryButtonVisibility: Boolean = false

    var onClick: (() -> Unit)? = null

    /** The callback for click on card preference itself. */
    private var onDismiss: (() -> Unit)? = null

    /** Enable the dismiss button on tips card. */
@@ -87,6 +90,7 @@ constructor(
                    iconResId
                        ?.takeIf { it != Resources.ID_NULL }
                        ?.let { ImageVector.vectorResource(it) },
                    onClick = onClick,
                )
            )
        }