Skip to content

Instantly share code, notes, and snippets.

@GianpaMX
Created April 25, 2022 11:59
Show Gist options
  • Save GianpaMX/e187c8bbf3be4cf507c147a24613f4bf to your computer and use it in GitHub Desktop.
Save GianpaMX/e187c8bbf3be4cf507c147a24613f4bf to your computer and use it in GitHub Desktop.
data class EditState(
val expense: Expense? = null,
val payers: List<Payer> = emptyList(),
val receivers: List<Receiver> = emptyList(),
val selectedPayer: Payer? = null,
val selectedReceiver: Receiver? = null,
) {
fun total() = payers.sumOf { it.amount }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment