From bf61d878cc1b1ed2823714b224fb1f9f8962a1e8 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 9 Jan 2025 14:15:15 -0700 Subject: [PATCH] Create event file. --- .../com/hyperling/expensetracker/ExpenseEvent.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 app/src/main/java/com/hyperling/expensetracker/ExpenseEvent.kt diff --git a/app/src/main/java/com/hyperling/expensetracker/ExpenseEvent.kt b/app/src/main/java/com/hyperling/expensetracker/ExpenseEvent.kt new file mode 100644 index 0000000..b342f92 --- /dev/null +++ b/app/src/main/java/com/hyperling/expensetracker/ExpenseEvent.kt @@ -0,0 +1,12 @@ +package com.hyperling.expensetracker + +sealed interface ExpenseEvent { + object SaveExpense: ExpenseEvent + data class SetName(val name: String): ExpenseEvent + data class SetCost(val cost: Double): ExpenseEvent + data class SetRate(val rate: Rate): ExpenseEvent + object ShowDialog: ExpenseEvent + object HideDialog: ExpenseEvent + data class SortExpenses(val rate: Rate): ExpenseEvent + data class DeleteExpense(val expense: Expense): ExpenseEvent +} \ No newline at end of file