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

Commit 72feedb9 authored by George Lin's avatar George Lin
Browse files

Fix no UI when launching app

This is because when sharing the replay = 1 was missing thus make the
flow wait forever instead of using a cached value from previous query.

Test: Manually tested. See bug.
Bug: 417560046
Flag: com.android.systemui.shared.new_customization_picker_ui
Change-Id: Iafee32a6e225998f6deccdeac10ce187828ec3b3
parent 1c133283
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -96,7 +96,11 @@ constructor(

    override val isAvailable: Flow<Boolean> =
        uri.map { it != null }
            .shareIn(scope = backgroundScope, started = SharingStarted.WhileSubscribed())
            .shareIn(
                scope = backgroundScope,
                started = SharingStarted.WhileSubscribed(),
                replay = 1,
            )

    override val isActivated: Flow<Boolean> =
        callbackFlow {