Coverage Summary for Class: TransactionsByAccountState (com.georgeci.moneysurfer.feature.transaction.list)
| Class |
Method, %
|
Branch, %
|
Line, %
|
Instruction, %
|
| TransactionsByAccountState$Companion |
|
| TransactionsByAccountState$Content |
100%
(3/3)
|
100%
(2/2)
|
100%
(18/18)
|
100%
(109/109)
|
| TransactionsByAccountState$Content$Companion |
|
| TransactionsByAccountState$Loading |
100%
(1/1)
|
|
100%
(2/2)
|
100%
(7/7)
|
| TransactionsByAccountState$Loading$Companion |
|
| Total |
100%
(4/4)
|
100%
(2/2)
|
100%
(20/20)
|
100%
(116/116)
|
package com.georgeci.moneysurfer.feature.transaction.list
import arrow.optics.optics
import com.georgeci.moneysurfer.domain.preferences.TransactionPeriodMode
import com.georgeci.moneysurfer.domain.primitives.AccountId
@optics
sealed interface TransactionsByAccountState {
val accountId: AccountId?
@optics
data class Loading(override val accountId: AccountId?) : TransactionsByAccountState {
companion object
}
@optics
data class Content(
override val accountId: AccountId?,
val accountName: String,
val groups: List<TransactionGroupUi>,
/** Whether a row should name the account it belongs to — true on the all-accounts list. */
val showAccountOnRows: Boolean,
val summary: TransactionSummaryUi,
val query: String,
val filters: TransactionFilterChipsUi,
val activeFilterCount: Int,
val isFiltered: Boolean,
val periodMode: TransactionPeriodMode,
val period: TransactionPeriodUi,
val showPeriodPager: Boolean,
val canGoToPreviousPeriod: Boolean,
val canGoToNextPeriod: Boolean,
val canLoadMore: Boolean,
) : TransactionsByAccountState {
val isEmpty: Boolean get() = groups.isEmpty()
/** Rows actually shown, across every day group — what the LazyColumn can scroll. */
val renderedRowCount: Int get() = groups.sumOf { it.transactions.size }
companion object
}
companion object
}