Skip to content

Commit 5149cf2

Browse files
committed
unit test category builder viewmodel
1 parent 8206bd4 commit 5149cf2

File tree

3 files changed

+387
-2
lines changed

3 files changed

+387
-2
lines changed

Diff for: features/finances/impl/src/main/kotlin/br/com/mob1st/features/finances/impl/ui/builder/CategoryBuilderViewModel.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ internal class CategoryBuilderViewModel(
6767
* Adds the given [name] to the manually added categories.
6868
* @param name The name of the category.
6969
*/
70-
fun typeCategoryName(name: String) = errorHandler.catching {
70+
fun typeCategoryName(name: String) {
7171
consumableDelegate.update {
7272
it.typeCategoryName(name)
7373
}

Diff for: features/finances/impl/src/main/kotlin/br/com/mob1st/features/finances/impl/ui/utils/texts/SeasonalRecurrencesTextState.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import androidx.compose.runtime.Composable
55
import androidx.compose.runtime.Immutable
66
import androidx.compose.runtime.remember
77
import androidx.compose.ui.platform.LocalContext
8+
import androidx.compose.ui.util.fastMap
89
import br.com.mob1st.core.design.atoms.properties.texts.TextState
910
import br.com.mob1st.features.finances.impl.R
1011
import br.com.mob1st.features.finances.impl.domain.entities.Recurrences
@@ -37,7 +38,7 @@ data class SeasonalRecurrencesTextState(
3738
private fun List<DayAndMonth>.resolve(locale: Locale): TextState {
3839
val symbols = DateFormatSymbols.getInstance(locale)
3940
val arguments = when (size) {
40-
1, 2 -> map {
41+
1, 2 -> fastMap {
4142
TextState(it.toShortMonth(locale, symbols))
4243
}
4344

0 commit comments

Comments
 (0)