Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ Note, that the main purpose with this app is code review, so building and instal
* Implemented by Ferenc Sági (sagifer)
* Idea and specification by Zsombor Kovács (huobb0)
* Photo by 'Science in HD' used under the Unsplash License; derived work by Ksenia Kotelnikova; original: Seamans Guard, Stagg Field, University of Chicago...Credit: U.S. Department of Energy, Historian's Office

* Fixed bugs on AndroidManifest.xml and TransactionInitDialogFragment.kt by Angga Arifandi (blackmenthor)
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

<activity
android:name=".view.LoginActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ import android.view.ViewGroup
import dagger.android.support.DaggerAppCompatDialogFragment
import eu.defdev.vulnabank.R
import eu.defdev.vulnabank.repository.transaction.TransactionRepository
import kotlinx.android.synthetic.main.fragment_transaction_init.*
import kotlinx.android.synthetic.main.fragment_transaction_init.accountNumber
import kotlinx.android.synthetic.main.fragment_transaction_init.amount
import kotlinx.android.synthetic.main.fragment_transaction_init.cancel
import kotlinx.android.synthetic.main.fragment_transaction_init.comment
import kotlinx.android.synthetic.main.fragment_transaction_init.name
import kotlinx.android.synthetic.main.fragment_transaction_init.ok
import javax.inject.Inject

class TransactionInitDialogFragment: DaggerAppCompatDialogFragment() {
Expand All @@ -26,9 +31,10 @@ class TransactionInitDialogFragment: DaggerAppCompatDialogFragment() {
super.onViewCreated(view, savedInstanceState)

ok.setOnClickListener {
clearTexts()
val dataIntent = Intent()
dataIntent.putExtra(INTENT_DATA, getStringContentOfTransaction())
val msg = getStringContentOfTransaction()
clearTexts()
dataIntent.putExtra(INTENT_DATA, msg)
targetFragment?.onActivityResult(targetRequestCode, Activity.RESULT_OK, dataIntent)
dismiss()
}
Expand All @@ -51,12 +57,12 @@ class TransactionInitDialogFragment: DaggerAppCompatDialogFragment() {
comment.text.clear()
}

private fun getStringContentOfTransaction(): String =
"${name.text};" +
private fun getStringContentOfTransaction(): String {
return "${name.text};" +
"${accountNumber.text};" +
"${amount.text};" +
"${comment.text}"

"${comment.text}";
}
private fun textChangeListener(action: () -> Unit) = object: TextWatcher {
override fun afterTextChanged(p0: Editable?) {
manageButtonState()
Expand Down