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

Co-authored-by: Zac McKenney <zmckenney@mozilla.com>
fenix/122.0
Zachary McKenney 7 months ago committed by GitHub
parent 31b50c9937
commit 992f2c565d

@ -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