From 71fdaa297ab0258a1135d9c09d30eac804ed2771 Mon Sep 17 00:00:00 2001 From: Shamim Shahrier Emon Date: Sun, 20 Oct 2024 16:09:31 +0600 Subject: [PATCH] [BUG] Added Missing default values for IvyFeatures (#3632) * Added Missing default values for IvyFeatures * Added Missing default values for IvyFeatures(Removed Default value for BoolFeature.defaultValue) --- .../src/main/java/com/ivy/domain/features/BoolFeature.kt | 2 +- .../src/main/java/com/ivy/domain/features/IvyFeatures.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/shared/domain/src/main/java/com/ivy/domain/features/BoolFeature.kt b/shared/domain/src/main/java/com/ivy/domain/features/BoolFeature.kt index 2f3907c382..e4403f9c36 100644 --- a/shared/domain/src/main/java/com/ivy/domain/features/BoolFeature.kt +++ b/shared/domain/src/main/java/com/ivy/domain/features/BoolFeature.kt @@ -20,7 +20,7 @@ class BoolFeature( val group: FeatureGroup? = null, val name: String? = null, val description: String? = null, - private val defaultValue: Boolean = false + private val defaultValue: Boolean ) { @Composable fun asEnabledState(): Boolean { diff --git a/shared/domain/src/main/java/com/ivy/domain/features/IvyFeatures.kt b/shared/domain/src/main/java/com/ivy/domain/features/IvyFeatures.kt index b09f3b9618..75e65a7783 100644 --- a/shared/domain/src/main/java/com/ivy/domain/features/IvyFeatures.kt +++ b/shared/domain/src/main/java/com/ivy/domain/features/IvyFeatures.kt @@ -10,21 +10,24 @@ class IvyFeatures @Inject constructor() : Features { key = "sort_categories_ascending", group = FeatureGroup.Category, name = "Sort categories list", - description = "Show categories in ascending order (A-Z) on the transaction entry screen" + description = "Show categories in ascending order (A-Z) on the transaction entry screen", + defaultValue = false ) override val compactAccountsMode = BoolFeature( key = "compact_account_ui", group = FeatureGroup.Account, name = "Compact account cards", - description = "Make the Accounts tab UI more compact and dense" + description = "Make the Accounts tab UI more compact and dense", + defaultValue = false ) override val compactCategoriesMode = BoolFeature( key = "compact_category_ui", group = FeatureGroup.Category, name = "Compact category cards", - description = "Simplified design of the Categories screen" + description = "Simplified design of the Categories screen", + defaultValue = false ) override val showTitleSuggestions = BoolFeature(