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

bundle rename

parent 7072104e
No related merge requests found
......@@ -40,18 +40,19 @@ class EditTransactionFragment : Fragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
transactionId = requireArguments().getInt("id")
val bundle : Bundle = requireArguments()
transactionId = bundle.getInt("id")
date = Instant.ofEpochMilli(
requireArguments().getLong("date"))
bundle.getLong("date"))
.atZone(ZoneId.systemDefault())
.toLocalDate()
name = requireArguments().getString("name")
when (requireArguments().getInt("category")){
name = bundle.getString("name")
when (bundle.getInt("category")){
1 -> category = TransactionCategory.PEMBELIAN
0 -> category = TransactionCategory.PEMASUKAN
}
location = requireArguments().getString("location")
nominal = requireArguments().getDouble("nominal")
location = bundle.getString("location")
nominal = bundle.getDouble("nominal")
try {
prefillInputFields()
} 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