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 900a0b9b47..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 @@ -6,63 +6,62 @@ 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 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" + 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 = "Activates a more streamlined and space-efficient interface for the \"Categories\" Screen" + name = "Compact category cards", + description = "Simplified design of 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 ) override val allFeatures: List get() = listOf( - sortCategoriesAlphabetically, + sortCategoriesAscending, compactAccountsMode, compactCategoriesMode, showTitleSuggestions,