Enable SyncNotificationsWithWorkManager in nightly and debug builds (#5573)

* Enable `SyncNotificationsWithWorkManager` in nightly and debug builds

* Fix tests
This commit is contained in:
Jorge Martin Espinosa
2025-10-22 16:55:40 +02:00
committed by GitHub
parent 13735f280b
commit 4861ae5171
2 changed files with 3 additions and 2 deletions

View File

@@ -114,7 +114,8 @@ enum class FeatureFlags(
title = "Sync notifications with WorkManager",
description = "Use WorkManager to schedule notification sync tasks when a push is received." +
" This should improve reliability and battery usage.",
defaultValue = { false },
// Enable by default on nightly and debug builds so we can get feedback before enabling it for everyone.
defaultValue = { meta -> meta.buildType != BuildType.RELEASE },
isFinished = false,
),
}

View File

@@ -690,7 +690,7 @@ class DefaultPushHandlerTest {
notificationChannels: FakeNotificationChannels = FakeNotificationChannels(),
pushHistoryService: PushHistoryService = FakePushHistoryService(),
syncOnNotifiableEvent: SyncOnNotifiableEvent = SyncOnNotifiableEvent {},
featureFlagService: FakeFeatureFlagService = FakeFeatureFlagService(),
featureFlagService: FakeFeatureFlagService = FakeFeatureFlagService(initialState = mapOf(FeatureFlags.SyncNotificationsWithWorkManager.key to false)),
workManagerScheduler: FakeWorkManagerScheduler = FakeWorkManagerScheduler(),
): DefaultPushHandler {
return DefaultPushHandler(