mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-05 21:20:45 +00:00
Bug 1816433 - Reduce maybeFetchExperiments interval when using the preview collection
(cherry picked from commit 30ab88c935389eb37e31d257c3bbceff021f370b)
This commit is contained in:
parent
f2021a941c
commit
5a2da30134
@ -102,8 +102,13 @@ fun NimbusInterface.maybeFetchExperiments(
|
||||
feature: NimbusSystem = FxNimbus.features.nimbusSystem.value(),
|
||||
currentTimeMillis: Long = System.currentTimeMillis(),
|
||||
) {
|
||||
val minimumPeriodMinutes = if (!context.settings().nimbusUsePreview) {
|
||||
feature.refreshIntervalForeground
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
||||
val lastFetchTimeMillis = context.settings().nimbusLastFetchTime
|
||||
val minimumPeriodMinutes = feature.refreshIntervalForeground
|
||||
val minimumPeriodMillis = minimumPeriodMinutes * Settings.ONE_MINUTE_MS
|
||||
|
||||
if (currentTimeMillis - lastFetchTimeMillis >= minimumPeriodMillis) {
|
||||
|
Loading…
Reference in New Issue
Block a user