Add state as well as fix SortType needs.
This commit is contained in:
parent
d5d525f65a
commit
a4513394d1
@ -7,6 +7,6 @@ sealed interface ExpenseEvent {
|
||||
data class SetRate(val rate: Rate): ExpenseEvent
|
||||
object ShowDialog: ExpenseEvent
|
||||
object HideDialog: ExpenseEvent
|
||||
data class SortExpenses(val rate: Rate): ExpenseEvent
|
||||
data class SortExpenses(val sortType: SortType): ExpenseEvent
|
||||
data class DeleteExpense(val expense: Expense): ExpenseEvent
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package com.hyperling.expensetracker
|
||||
|
||||
data class ExpenseState(
|
||||
val expenses: List<Expense> = emptyList(),
|
||||
val firstName: String = "",
|
||||
val lastName: String = "",
|
||||
val phoneNumber: String = "",
|
||||
val isAddingExpense: Boolean = false,
|
||||
val sortType: SortType = SortType.NAME,
|
||||
)
|
@ -0,0 +1,7 @@
|
||||
package com.hyperling.expensetracker
|
||||
|
||||
enum class SortType {
|
||||
NAME,
|
||||
COST,
|
||||
RATE,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user