From 473f87a3cb14d6a79927e257fbf1f9de8a35d0ae Mon Sep 17 00:00:00 2001 From: shamim-emon Date: Sat, 14 Sep 2024 21:43:15 +0600 Subject: [PATCH] Fix for : EditTransactionViewModel.kt:859:24: This condition is too complex (4). Defined complexity threshold for conditions is set to '4' [ComplexCondition] --- .../java/com/ivy/transaction/EditTransactionViewModel.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 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 c568f04b1f..775eec5f37 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 @@ -856,10 +856,9 @@ class EditTransactionViewModel @Inject constructor( } val exRate = exchangeRate - ?: if (customExchangeRateState.showCard && - toAccCurrencyCode == customExchangeRateState.toCurrencyCode && - fromAccCurrencyCode == customExchangeRateState.fromCurrencyCode && - !resetRate + ?: if ( + customExchangeRateState.showCard && toAccCurrencyCode == customExchangeRateState.toCurrencyCode && + fromAccCurrencyCode == customExchangeRateState.fromCurrencyCode && !resetRate ) { customExchangeRateState.exchangeRate } else {