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

Commit 9959a76d authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Do not collect `notifsPresent` flow unless onboarding is needed.

Flag: android.app.nm_summarization_onboarding_ui
Bug: 432220047
Test: manual
Change-Id: I3e801e73a75c362f77cb23de69a228c2c1427bfb
parent b1a389df
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -65,7 +65,9 @@ constructor(
        userInteractor.selectedUser.mapLatestConflated { userId -> isAvailableAndDisabled(userId) }

    val onboardingNeeded: Flow<Boolean> =
        allOf(onboardingUnseen, summarizationAvailableAndDisabled, notifsPresent)
        allOf(onboardingUnseen, summarizationAvailableAndDisabled)
            .distinctUntilChanged()
            .flatMapLatestConflated { if (it) notifsPresent else flowOf(false) }
            .distinctUntilChanged()
            .flowOn(bgDispatcher)