aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt12
1 files changed, 5 insertions, 7 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt
index fa61d53..5071520 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt
@@ -60,14 +60,11 @@ class LoginFragment : Fragment() {
}
private fun setupEvents() {
- binding.usernameEditText.doAfterTextChanged {
- loginViewModel.email.value = it.toString()
- }
- binding.passwordEditText.doAfterTextChanged {
- loginViewModel.password.value = it.toString()
- }
binding.signinButton.setOnClickListener {
- loginViewModel.login()
+ loginViewModel.login(
+ binding.usernameEditText.text.toString(),
+ binding.passwordEditText.text.toString()
+ )
}
}
@@ -95,6 +92,7 @@ class LoginFragment : Fragment() {
startActivity(intent)
activity.finish()
}
+ else -> {}
}
}
}