Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technical Analytics: Milestone 1 - Add Feature Flag Statuses and Ability To Sync Them to Cache Store #5203

Merged
merged 37 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
3fee528
feat: Add a FeatureFlagConstants file to host feature flags
kkmurerwa Oct 18, 2023
9c09fbf
feat: Add constant names for easy retrieval of the feature flags from…
kkmurerwa Oct 18, 2023
b0d1572
feat: Add newly status flags to the Platform Parameter dependency mod…
kkmurerwa Oct 18, 2023
7e13530
feat: Add ability to insert sync statuses to the cache store
kkmurerwa Oct 20, 2023
6c06ea5
feat: Add ability to save flag statuses for every feature flag
kkmurerwa Oct 23, 2023
5e26d8e
Merge branch 'oppia:develop' into technical-analytics-milestone-1
kkmurerwa Oct 23, 2023
1f0fa64
fix: Fix linting and styling checks
kkmurerwa Oct 23, 2023
f4f5ff2
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 24, 2023
795e90c
fix: Fix comments made on the previous review
kkmurerwa Oct 26, 2023
dd5c5b2
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 26, 2023
da852b4
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 29, 2023
9da1607
fix: Fix nit
kkmurerwa Oct 29, 2023
0c0cd75
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Oct 30, 2023
4dae83c
fix: Fix lint issues causing build failure
kkmurerwa Oct 30, 2023
81d968b
fix: Move test sync status flag booleans to the TestBooleanPlatformPa…
kkmurerwa Oct 30, 2023
d8f14bd
chore: Move all test constants from individual type-organized files t…
kkmurerwa Nov 1, 2023
7918da5
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 1, 2023
7bcbdcf
fix: Fix failing text file checks
kkmurerwa Nov 1, 2023
ed2b7ac
Merge branch 'technical-analytics-milestone-1' of github.com:kkmurerw…
kkmurerwa Nov 1, 2023
5638b31
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 1, 2023
a1846ce
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 6, 2023
b49df60
feat: Add a isSynced variable in the platform parameter variable to s…
kkmurerwa Nov 7, 2023
7ee1fd8
fix: Fix failing EventBundleCreator tests
kkmurerwa Nov 7, 2023
b9f28ba
feat: Make Sync status an enum
kkmurerwa Nov 14, 2023
c0338b0
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 14, 2023
501ae40
feat: Add feature flag names to all flags lacking one
kkmurerwa Nov 14, 2023
91c526d
Merge branch 'technical-analytics-milestone-1' of github.com:kkmurerw…
kkmurerwa Nov 14, 2023
551fd4a
fix: Fix failing check and linting issue
kkmurerwa Nov 15, 2023
e6d748f
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 15, 2023
3b19e3f
merge: Merge from develop and fix conflicts
kkmurerwa Nov 17, 2023
df983b9
chore: Remove unused feature flag
kkmurerwa Nov 17, 2023
d3ca9d0
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 21, 2023
7b6a4f7
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 22, 2023
8f1d1cc
fix: Fix minor linting issues
kkmurerwa Nov 24, 2023
0a58483
Merge branch 'develop' into technical-analytics-milestone-1
BenHenning Nov 29, 2023
92c4703
Merge branch 'develop' into technical-analytics-milestone-1
kkmurerwa Nov 29, 2023
3e203c4
chore: Modify the PlatformParameterValue default sync status name
kkmurerwa Nov 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import android.content.Context
import dagger.Module
import dagger.Provides
import org.oppia.android.app.utility.getVersionCode
import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.CacheLatexRendering
import org.oppia.android.util.platformparameter.DOWNLOADS_SUPPORT
import org.oppia.android.util.platformparameter.EDIT_ACCOUNTS_OPTIONS_UI
import org.oppia.android.util.platformparameter.ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
Expand All @@ -16,6 +19,7 @@ import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEF
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi
Expand All @@ -30,6 +34,7 @@ import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.INTERACTION_CONFIG_CHANGE_STATE_RETENTION
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
import org.oppia.android.util.platformparameter.LOWEST_SUPPORTED_API_LEVEL
Expand All @@ -56,6 +61,7 @@ import org.oppia.android.util.platformparameter.PlatformParameterSingleton
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SPOTLIGHT_UI
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SplashScreenWelcomeMsg
Expand All @@ -70,8 +76,12 @@ import org.oppia.android.util.platformparameter.SyncUpWorkerTimePeriodHours
class PlatformParameterAlphaKenyaModule {
@Provides
@EnableDownloadsSupport
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
fun provideEnableDownloadsSupport(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(DOWNLOADS_SUPPORT)
?: PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
}

@Provides
@SplashScreenWelcomeMsg
Expand Down Expand Up @@ -104,8 +114,12 @@ class PlatformParameterAlphaKenyaModule {

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableEditAccountsOptionsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EDIT_ACCOUNTS_OPTIONS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
)
}
Expand Down Expand Up @@ -199,32 +213,45 @@ class PlatformParameterAlphaKenyaModule {

@Provides
@EnableExtraTopicTabsUi
fun provideEnableExtraTopicTabsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableExtraTopicTabsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EXTRA_TOPIC_TABS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableInteractionConfigChangeStateRetention(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
INTERACTION_CONFIG_CHANGE_STATE_RETENTION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
)
}

@Provides
@EnableSpotlightUi
fun enableSpotlightUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
)
fun provideEnableSpotlightUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(SPOTLIGHT_UI)
?: PlatformParameterValue.createDefaultParameter(ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableAppAndOsDeprecation(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
APP_AND_OS_DEPRECATION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import android.content.Context
import dagger.Module
import dagger.Provides
import org.oppia.android.app.utility.getVersionCode
import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.CacheLatexRendering
import org.oppia.android.util.platformparameter.DOWNLOADS_SUPPORT
import org.oppia.android.util.platformparameter.EDIT_ACCOUNTS_OPTIONS_UI
import org.oppia.android.util.platformparameter.ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
Expand All @@ -15,6 +18,7 @@ import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE
import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi
Expand All @@ -30,6 +34,7 @@ import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSO
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.INTERACTION_CONFIG_CHANGE_STATE_RETENTION
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS_DEFAULT_VALUE
Expand Down Expand Up @@ -57,6 +62,7 @@ import org.oppia.android.util.platformparameter.PlatformParameterSingleton
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SPOTLIGHT_UI
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SplashScreenWelcomeMsg
Expand All @@ -67,8 +73,12 @@ import org.oppia.android.util.platformparameter.SyncUpWorkerTimePeriodHours
class PlatformParameterAlphaModule {
@Provides
@EnableDownloadsSupport
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
fun provideEnableDownloadsSupport(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(DOWNLOADS_SUPPORT)
?: PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
}

@Provides
@SplashScreenWelcomeMsg
Expand Down Expand Up @@ -101,8 +111,12 @@ class PlatformParameterAlphaModule {

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableEditAccountsOptionsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EDIT_ACCOUNTS_OPTIONS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
)
}
Expand Down Expand Up @@ -195,31 +209,46 @@ class PlatformParameterAlphaModule {

@Provides
@EnableSpotlightUi
fun provideEnableSpotlightUi(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(true) // Enable spotlights for alpha users.
fun provideEnableSpotlightUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(SPOTLIGHT_UI)
?: PlatformParameterValue.createDefaultParameter(true) // Enable spotlights for alpha users.
}

@Provides
@EnableExtraTopicTabsUi
fun provideEnableExtraTopicTabsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableExtraTopicTabsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EXTRA_TOPIC_TABS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableInteractionConfigChangeStateRetention(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
INTERACTION_CONFIG_CHANGE_STATE_RETENTION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
fun provideEnableAppAndOsDeprecation(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(APP_AND_OS_DEPRECATION)
?: PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
}

@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import android.content.Context
import dagger.Module
import dagger.Provides
import org.oppia.android.app.utility.getVersionCode
import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.CacheLatexRendering
import org.oppia.android.util.platformparameter.DOWNLOADS_SUPPORT
import org.oppia.android.util.platformparameter.EDIT_ACCOUNTS_OPTIONS_UI
import org.oppia.android.util.platformparameter.ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
Expand All @@ -16,6 +19,7 @@ import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEF
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi
Expand All @@ -31,6 +35,7 @@ import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSO
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.INTERACTION_CONFIG_CHANGE_STATE_RETENTION
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
Expand Down Expand Up @@ -59,6 +64,7 @@ import org.oppia.android.util.platformparameter.PlatformParameterSingleton
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SPOTLIGHT_UI
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SplashScreenWelcomeMsg
Expand All @@ -69,8 +75,12 @@ import org.oppia.android.util.platformparameter.SyncUpWorkerTimePeriodHours
class PlatformParameterModule {
@Provides
@EnableDownloadsSupport
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
fun provideEnableDownloadsSupport(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(DOWNLOADS_SUPPORT)
?: PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
}

@Provides
@SplashScreenWelcomeMsg
Expand Down Expand Up @@ -103,8 +113,12 @@ class PlatformParameterModule {

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableEditAccountsOptionsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EDIT_ACCOUNTS_OPTIONS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
)
}
Expand Down Expand Up @@ -197,34 +211,46 @@ class PlatformParameterModule {

@Provides
@EnableSpotlightUi
fun provideEnableSpotlightUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
)
fun provideEnableSpotlightUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(SPOTLIGHT_UI)
?: PlatformParameterValue.createDefaultParameter(ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE)
}

@Provides
@EnableExtraTopicTabsUi
fun provideEnableExtraTopicTabsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableExtraTopicTabsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EXTRA_TOPIC_TABS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableInteractionConfigChangeStateRetention(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
INTERACTION_CONFIG_CHANGE_STATE_RETENTION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
fun provideEnableAppAndOsDeprecation(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(APP_AND_OS_DEPRECATION)
?: PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
}

@Provides
Expand Down
Loading
Loading