Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fix issue Ivy-Apps#2971: Enabled adding categories for Account Transfers. In the commits and PRs I intend to display category of the account transfer

* Removed the unused parameter
  • Loading branch information
diasmashikov authored Feb 24, 2024
1 parent 165d21d commit 0cc4bed
Showing 1 changed file with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,11 @@ private fun BoxWithConstraintsScope.UI(
)
}

if (transactionType != TransactionType.TRANSFER) {
Spacer(Modifier.height(32.dp))
Spacer(Modifier.height(32.dp))

Category(category = category, onChooseCategory = {
chooseCategoryModalVisible = true
})
}
Category(category = category, onChooseCategory = {
chooseCategoryModalVisible = true
})

Spacer(Modifier.height(32.dp))

Expand Down Expand Up @@ -468,7 +466,7 @@ private fun BoxWithConstraintsScope.UI(

onAmountChanged = {
onAmountChanged(it)
if (shouldFocusCategory(category, transactionType)) {
if (shouldFocusCategory(category)) {
chooseCategoryModalVisible = true
} else if (shouldFocusTitle(titleTextFieldValue, transactionType)) {
titleFocus.requestFocus()
Expand Down Expand Up @@ -589,8 +587,7 @@ private fun BoxWithConstraintsScope.UI(

private fun shouldFocusCategory(
category: Category?,
type: TransactionType
): Boolean = category == null && type != TransactionType.TRANSFER
): Boolean = category == null

private fun shouldFocusTitle(
titleTextFieldValue: TextFieldValue,
Expand Down

0 comments on commit 0cc4bed

Please sign in to comment.