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

Commit 372598b2 authored by Chaohui Wang's avatar Chaohui Wang
Browse files

[Spa] Remove unnecessary remember from switch

From InternalSwitchPreference, otherwise the change of onChangeWithLog
will be ignored.

Fix: 361496036
Flag: EXEMPT bug fix
Test: manual - Launch via NFC
Change-Id: Icbeff7f19aa7a0ece4fe733ff3f39a29bb45605d
parent 5c7153aa
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ internal fun InternalSwitchPreference(
    val indication = LocalIndication.current
    val onChangeWithLog = wrapOnSwitchWithLog(onCheckedChange)
    val interactionSource = remember { MutableInteractionSource() }
    val modifier = remember(checked, changeable) {
    val modifier =
        if (checked != null && onChangeWithLog != null) {
            Modifier.toggleable(
                value = checked,
@@ -128,7 +128,6 @@ internal fun InternalSwitchPreference(
                onValueChange = onChangeWithLog,
            )
        } else Modifier
    }
    BasePreference(
        title = title,
        summary = summary,