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

Commit 65b17caa authored by Steve Elliott's avatar Steve Elliott
Browse files

[kairos] cache switch-off event for TransactionScope.now

Flag: com.android.systemui.status_bar_mobile_icon_kairos
Bug: 383172066
Test: atest
Change-Id: I4d7d79b417b3e66d5cb9599e5128e49fd760065e
parent b02ab64e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ internal class EvalScopeImpl(networkScope: NetworkScope, deferScope: DeferScope)

    override val now: Events<Unit> by lazy {
        var result by EventsLoop<Unit>()
        val switchOff = result.mapCheap { emptyEvents }
        result =
            StateInit(
                    constInit(
@@ -58,7 +59,7 @@ internal class EvalScopeImpl(networkScope: NetworkScope, deferScope: DeferScope)
                            "now",
                            "now",
                            this,
                            { result.mapCheap { emptyEvents }.init.connect(evalScope = this) },
                            { switchOff.init.connect(evalScope = this) },
                            CompletableLazy(
                                EventsInit(
                                    constInit(