Skip to content
Snippets Groups Projects
Commit a4653e07 authored by Christophorus Dharma Winata's avatar Christophorus Dharma Winata
Browse files

bundle rename

parent 7072104e
Branches feat/edit
No related merge requests found
...@@ -40,18 +40,19 @@ class EditTransactionFragment : Fragment() { ...@@ -40,18 +40,19 @@ class EditTransactionFragment : Fragment() {
} }
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
transactionId = requireArguments().getInt("id") val bundle : Bundle = requireArguments()
transactionId = bundle.getInt("id")
date = Instant.ofEpochMilli( date = Instant.ofEpochMilli(
requireArguments().getLong("date")) bundle.getLong("date"))
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
.toLocalDate() .toLocalDate()
name = requireArguments().getString("name") name = bundle.getString("name")
when (requireArguments().getInt("category")){ when (bundle.getInt("category")){
1 -> category = TransactionCategory.PEMBELIAN 1 -> category = TransactionCategory.PEMBELIAN
0 -> category = TransactionCategory.PEMASUKAN 0 -> category = TransactionCategory.PEMASUKAN
} }
location = requireArguments().getString("location") location = bundle.getString("location")
nominal = requireArguments().getDouble("nominal") nominal = bundle.getDouble("nominal")
try { try {
prefillInputFields() prefillInputFields()
} catch (e : Exception){ } catch (e : Exception){
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment