Skip to content

Commit

Permalink
Deprecate domain.logic package
Browse files Browse the repository at this point in the history
  • Loading branch information
ILIYANGERMANOV committed Apr 15, 2022
1 parent 16d25fa commit 0d36354
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import com.ivy.wallet.ui.main.MainTab
import com.ivy.wallet.ui.theme.*
import com.ivy.wallet.ui.widget.AddTransactionWidgetCompact

@Deprecated("Use FP style, look into `domain.fp` package")
class CustomerJourneyLogic(
private val transactionDao: TransactionDao,
private val plannedPaymentRuleDao: PlannedPaymentRuleDao,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.ivy.wallet.io.persistence.dao.LoanRecordDao
import com.ivy.wallet.utils.ioThread
import java.util.*

@Deprecated("Use FP style, look into `domain.fp` package")
class LoanRecordCreator(
private val paywallLogic: PaywallLogic,
private val dao: LoanRecordDao,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.ivy.wallet.utils.capitalizeWords
import com.ivy.wallet.utils.isNotNullOrBlank
import java.util.*

@Deprecated("Migrate to FP Style")
@Deprecated("Use FP style, look into `domain.fp` package")
class SmartTitleSuggestionsLogic(
private val transactionDao: TransactionDao
) {
Expand Down Expand Up @@ -85,6 +85,7 @@ class SmartTitleSuggestionsLogic(
}
}

@Deprecated("Use FP style, look into `domain.fp` package")
private fun List<Transaction>.extractUniqueTitles(
excludeSuggestions: Set<String>? = null
): Set<String> {
Expand All @@ -95,6 +96,7 @@ private fun List<Transaction>.extractUniqueTitles(
.toSet()
}

@Deprecated("Use FP style, look into `domain.fp` package")
private fun Set<String>.sortedByMostUsedFirst(countUses: (String) -> Long): Set<String> {
val titleCountMap = this
.map {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import com.ivy.wallet.io.network.RestClient
import com.ivy.wallet.io.persistence.SharedPrefs
import com.ivy.wallet.ui.RootActivity

@Deprecated("Use FP style, look into `domain.fp` package")
class BankIntegrationsLogic(
restClient: RestClient,
private val seTransactionMapper: SaltEdgeTransactionMapper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.ivy.wallet.ui.theme.components.IVY_COLOR_PICKER_COLORS_FREE
import com.ivy.wallet.utils.toLowerCaseLocal
import java.util.*

@Deprecated("Use FP style, look into `domain.fp` package")
class SaltEdgeAccountMapper(
private val accountDao: AccountDao
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ import java.util.*
}
*/

@Deprecated("Use FP style, look into `domain.fp` package")
class SaltEdgeCategoryMapper(
private val categoryDao: CategoryDao
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import java.time.format.DateTimeFormatter
import java.util.*
import kotlin.math.absoluteValue

@Deprecated("Use FP style, look into `domain.fp` package")
class SaltEdgeTransactionMapper(
private val transactionDao: TransactionDao,
private val seAccountMapper: SaltEdgeAccountMapper,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.ivy.wallet.io.persistence.dao.SettingsDao
import com.ivy.wallet.utils.sendToCrashlytics
import java.util.*

@Deprecated("Use FP style, look into `domain.fp` package")
class ExchangeRatesLogic(
restClient: RestClient,
private val exchangeRateDao: ExchangeRateDao
Expand Down Expand Up @@ -148,6 +149,7 @@ class ExchangeRatesLogic(
}
}

@Deprecated("Use FP style, look into `domain.fp` package")
fun Iterable<Transaction>.sumInBaseCurrency(
exchangeRatesLogic: ExchangeRatesLogic,
settingsDao: SettingsDao,
Expand All @@ -165,6 +167,7 @@ fun Iterable<Transaction>.sumInBaseCurrency(
}
}

@Deprecated("Use FP style, look into `domain.fp` package")
fun Iterable<PlannedPaymentRule>.sumByDoublePlannedInBaseCurrency(
exchangeRatesLogic: ExchangeRatesLogic,
settingsDao: SettingsDao,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.ivy.wallet.utils.timeNowLocal
import com.ivy.wallet.utils.toEpochSeconds
import java.util.concurrent.TimeUnit

@Deprecated("Use FP style, look into `domain.fp` package")
class TransactionReminderLogic(
private val appContext: Context,
private val sharedPrefs: SharedPrefs,
Expand Down

0 comments on commit 0d36354

Please sign in to comment.