From c9a9279e14715e3c012db10d420dafb71fcfb68b Mon Sep 17 00:00:00 2001 From: t-p-white Date: Tue, 7 Feb 2023 14:09:49 +0000 Subject: [PATCH] [fenix] Bug 1815433 - Pre-release fix up of defaults in messaging.fml.yaml configuration. --- .../fenix/gleanplumb/MessageNotificationWorker.kt | 2 +- mobile/android/fenix/messaging.fml.yaml | 24 ++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/gleanplumb/MessageNotificationWorker.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/gleanplumb/MessageNotificationWorker.kt index bf1bf64bc3ac..d671610826f8 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/gleanplumb/MessageNotificationWorker.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/gleanplumb/MessageNotificationWorker.kt @@ -146,7 +146,7 @@ class MessageNotificationWorker( fun setMessageNotificationWorker(context: Context) { val featureConfig = FxNimbus.features.messaging.value() val notificationConfig = featureConfig.notificationConfig - val pollingInterval = notificationConfig.pollingInterval.toLong() + val pollingInterval = notificationConfig.refreshInterval.toLong() val messageWorkRequest = PeriodicWorkRequest.Builder( MessageNotificationWorker::class.java, diff --git a/mobile/android/fenix/messaging.fml.yaml b/mobile/android/fenix/messaging.fml.yaml index 9b80e14bb0d8..e0678652ccf1 100644 --- a/mobile/android/fenix/messaging.fml.yaml +++ b/mobile/android/fenix/messaging.fml.yaml @@ -133,6 +133,9 @@ features: URGENT: priority: 100 max-display-count: 10 + NOTIFICATION: + priority: 50 + max-display-count: 1 messages: default-browser: text: default_browser_experiment_card_text @@ -152,14 +155,17 @@ features: priority: 100 max-display-count: 1 notification-config: - polling-interval: 15 # minutes + refresh-interval: 120 # minutes (2 hours) messages: - test-notification: - title: "Test title" - text: "Test text" + default-browser-notification: + title: preferences_set_as_default_browser + text: default_browser_experiment_card_text surface: notification - trigger: [ "ALWAYS" ] - action: "MAKE_DEFAULT_BROWSER" + style: NOTIFICATION + action: MAKE_DEFAULT_BROWSER + trigger: + - I_AM_NOT_DEFAULT_BROWSER + - INACTIVE_2_DAYS objects: MessageData: @@ -215,7 +221,7 @@ objects: default: [] StyleData: description: > - A group of properities (predominantly visual) to + A group of properties (predominantly visual) to describe the style of the message. fields: priority: @@ -233,12 +239,12 @@ objects: NotificationConfig: description: Attributes controlling the global configuration of notification messages. fields: - polling-interval: + refresh-interval: type: Int description: > How often, in minutes, the notification message worker will wake up and check for new messages. - default: 60 + default: 240 # 4 hours enums: ControlMessageBehavior: -- 2.11.4.GIT