From c2fa5924ddbb0ae4d5d68dca61ee1bd98c1265e2 Mon Sep 17 00:00:00 2001 From: Renan Lukas <14964993+RenanLukas@users.noreply.github.com> Date: Thu, 16 May 2024 16:08:57 -0300 Subject: [PATCH] Add reader announcement card feature config --- WordPress/build.gradle | 1 + .../config/ReaderAnnouncementCardFeatureConfig.kt | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 WordPress/src/main/java/org/wordpress/android/util/config/ReaderAnnouncementCardFeatureConfig.kt diff --git a/WordPress/build.gradle b/WordPress/build.gradle index 2ac338ca6eca..ee393d97a0b3 100644 --- a/WordPress/build.gradle +++ b/WordPress/build.gradle @@ -152,6 +152,7 @@ android { buildConfigField "boolean", "READER_READING_PREFERENCES", "false" buildConfigField "boolean", "READER_READING_PREFERENCES_FEEDBACK", "false" buildConfigField "boolean", "READER_TAGS_FEED", "false" + buildConfigField "boolean", "READER_ANNOUNCEMENT_CARD", "true" // Override these constants in jetpack product flavor to enable/ disable features buildConfigField "boolean", "ENABLE_SITE_CREATION", "true" diff --git a/WordPress/src/main/java/org/wordpress/android/util/config/ReaderAnnouncementCardFeatureConfig.kt b/WordPress/src/main/java/org/wordpress/android/util/config/ReaderAnnouncementCardFeatureConfig.kt new file mode 100644 index 000000000000..9c9a87bb2645 --- /dev/null +++ b/WordPress/src/main/java/org/wordpress/android/util/config/ReaderAnnouncementCardFeatureConfig.kt @@ -0,0 +1,15 @@ +package org.wordpress.android.util.config + +import org.wordpress.android.BuildConfig +import org.wordpress.android.annotation.Feature +import javax.inject.Inject + +private const val READER_ANNOUNCEMENT_CARD_REMOTE_FIELD = "reader_announcement_card" +@Feature(remoteField = READER_ANNOUNCEMENT_CARD_REMOTE_FIELD, defaultValue = false) +class ReaderAnnouncementCardFeatureConfig @Inject constructor( + appConfig: AppConfig +) : FeatureConfig( + appConfig, + BuildConfig.READER_ANNOUNCEMENT_CARD, + READER_ANNOUNCEMENT_CARD_REMOTE_FIELD, +)