From 2b7c04cd7ebec2d1e2b0b9950ea4ddabca59bed3 Mon Sep 17 00:00:00 2001 From: nvllz Date: Mon, 7 Oct 2024 15:06:21 +0200 Subject: [PATCH 1/3] ivyfeatures-text-enhancement --- .../com/ivy/domain/features/IvyFeatures.kt | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) 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 900a0b9b47..1a0b73f60e 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 @@ -9,54 +9,53 @@ class IvyFeatures @Inject constructor() : Features { override val sortCategoriesAlphabetically = BoolFeature( key = "sort_categories_alphabetically", group = FeatureGroup.Category, - name = "Sort Categories Alphabetically", - description = "Sort income and expenses" + - " categories alphabetically" + name = "Sort categories list", + description = "Show categories in ascending order (A-Z) on the transaction entry screen" ) override val compactAccountsMode = BoolFeature( key = "compact_account_ui", group = FeatureGroup.Account, name = "Compact account UI", - description = "Enables more compact and dense UI for the \"Accounts\" tab" + description = "Make the \"Accounts\" tab UI more compact and dense" ) override val compactCategoriesMode = BoolFeature( key = "compact_categories_ui", group = FeatureGroup.Category, name = "Compact category UI", - description = "Activates a more streamlined and space-efficient interface for the \"Categories\" Screen" + description = "More compact and space-saving layout for the \"Categories\" screen" ) override val showTitleSuggestions = BoolFeature( key = "show_title_suggestions", group = FeatureGroup.Other, name = "Show previous title suggestions", - description = "Enables display of previous transaction titles when editing or creating a new transaction", + description = "Suggest past transaction titles when creating a new entry", defaultValue = true ) override val showCategorySearchBar = BoolFeature( key = "search_categories", group = FeatureGroup.Category, - name = "Search categories", - description = "Show search bar in category screen", + name = "Search within categories", + description = "Display a search bar on the \"Categories\" screen", defaultValue = true ) override val hideTotalBalance = BoolFeature( key = "hide_total_balance", group = FeatureGroup.Account, - name = "Hide total balance", - description = "Enable hide the total balance from the accounts tab", + name = "Hide account total balance", + description = "Replace the total balance values with asterisks on the Accounts screen", defaultValue = false ) override val showDecimalNumber = BoolFeature( key = "show_decimal_number", group = FeatureGroup.Other, - name = "Show Decimal Number", - description = "Whether to show the decimal part in amounts", + name = "Show values with decimals", + description = "Include the decimal part in amounts", defaultValue = true ) From 8e46b8d4783c47419599893e2351f6a24ed1991d Mon Sep 17 00:00:00 2001 From: nvllz Date: Mon, 7 Oct 2024 18:41:31 +0200 Subject: [PATCH 2/3] ivyfeatures-text-enhancement --- .../ivy/transaction/EditTransactionViewModel.kt | 6 +++--- .../main/java/com/ivy/domain/features/Features.kt | 2 +- .../java/com/ivy/domain/features/IvyFeatures.kt | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionViewModel.kt b/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionViewModel.kt index 4d2adfa7c3..189a657e86 100644 --- a/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionViewModel.kt +++ b/screen/edit-transaction/src/main/java/com/ivy/transaction/EditTransactionViewModel.kt @@ -987,14 +987,14 @@ class EditTransactionViewModel @Inject constructor( private suspend fun sortCategories(): ImmutableList { val categories = categoryRepository.findAll() - return if (shouldSortCategoriesAlphabetically()) { + return if (shouldSortCategoriesAscending()) { categories.sortedBy { it.name.value }.toImmutableList() } else { categories.toImmutableList() } } - private suspend fun shouldSortCategoriesAlphabetically(): Boolean { - return features.sortCategoriesAlphabetically.isEnabled(context) + private suspend fun shouldSortCategoriesAscending(): Boolean { + return features.sortCategoriesAscending.isEnabled(context) } } diff --git a/shared/domain/src/main/java/com/ivy/domain/features/Features.kt b/shared/domain/src/main/java/com/ivy/domain/features/Features.kt index af043582b2..eeb8a27ada 100644 --- a/shared/domain/src/main/java/com/ivy/domain/features/Features.kt +++ b/shared/domain/src/main/java/com/ivy/domain/features/Features.kt @@ -1,7 +1,7 @@ package com.ivy.domain.features interface Features { - val sortCategoriesAlphabetically: BoolFeature + val sortCategoriesAscending: BoolFeature val compactAccountsMode: BoolFeature val compactCategoriesMode: BoolFeature val showTitleSuggestions: BoolFeature 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 1a0b73f60e..092ffbcf0f 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 @@ -6,8 +6,8 @@ import javax.inject.Singleton @Singleton class IvyFeatures @Inject constructor() : Features { - override val sortCategoriesAlphabetically = BoolFeature( - key = "sort_categories_alphabetically", + override val sortCategoriesAscending = BoolFeature( + key = "sort_categories_ascending", group = FeatureGroup.Category, name = "Sort categories list", description = "Show categories in ascending order (A-Z) on the transaction entry screen" @@ -16,15 +16,15 @@ class IvyFeatures @Inject constructor() : Features { override val compactAccountsMode = BoolFeature( key = "compact_account_ui", group = FeatureGroup.Account, - name = "Compact account UI", + name = "Compact account cards", description = "Make the \"Accounts\" tab UI more compact and dense" ) override val compactCategoriesMode = BoolFeature( - key = "compact_categories_ui", + key = "compact_category_ui", group = FeatureGroup.Category, - name = "Compact category UI", - description = "More compact and space-saving layout for the \"Categories\" screen" + name = "Compact category cards", + description = "Simplified design of the \"Categories\" screen" ) override val showTitleSuggestions = BoolFeature( @@ -61,7 +61,7 @@ class IvyFeatures @Inject constructor() : Features { override val allFeatures: List get() = listOf( - sortCategoriesAlphabetically, + sortCategoriesAscending, compactAccountsMode, compactCategoriesMode, showTitleSuggestions, From 9080ef2d0c4fa7ac7fa8475a8a475b8fae5e46e9 Mon Sep 17 00:00:00 2001 From: nvllz Date: Mon, 7 Oct 2024 19:08:10 +0200 Subject: [PATCH 3/3] remove-redundant-quotation-marks --- .../src/main/java/com/ivy/domain/features/IvyFeatures.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 092ffbcf0f..b422e296cd 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 @@ -17,14 +17,14 @@ class IvyFeatures @Inject constructor() : Features { 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" ) 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" ) override val showTitleSuggestions = BoolFeature( @@ -39,7 +39,7 @@ class IvyFeatures @Inject constructor() : Features { key = "search_categories", group = FeatureGroup.Category, name = "Search within categories", - description = "Display a search bar on the \"Categories\" screen", + description = "Display a search bar on the Categories screen", defaultValue = true )