Bug 1869049 - stop periodic ingestion when FxSuggest disabled (#4770)

Co-authored-by: Zac McKenney <zmckenney@mozilla.com>
(cherry picked from commit 64d4ee66496ec0fada507a562cd2ff45dc4c77cb)
fenix/121.0
Zachary McKenney 5 months ago committed by Ryan VanderMeulen
parent b2bbbcd3f8
commit c3c6d58f10

@ -374,9 +374,11 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
// If Firefox Suggest is enabled, register a worker to periodically ingest
// new search suggestions. The worker requires us to have called
// `GlobalFxSuggestDependencyProvider.initialize`, which we did before
// scheduling these tasks.
// scheduling these tasks. When disabled we stop the periodic work.
if (settings().enableFxSuggest) {
components.fxSuggest.ingestionScheduler.startPeriodicIngestion()
} else {
components.fxSuggest.ingestionScheduler.stopPeriodicIngestion()
}
}
}

Loading…
Cancel
Save