aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/session
diff options
context:
space:
mode:
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/session')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt4
1 files changed, 3 insertions, 1 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 cc84f06..674c2d3 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
@@ -10,10 +10,12 @@ import android.widget.Toast
import androidx.core.widget.doAfterTextChanged
import androidx.fragment.app.Fragment
import com.zhuinden.liveevent.observe
+import kotlinx.coroutines.DelicateCoroutinesApi
import mx.trackermap.TrackerMap.android.databinding.LoginBinding
import mx.trackermap.TrackerMap.android.units.UnitsActivity
import org.koin.androidx.viewmodel.ext.android.viewModel
+@DelicateCoroutinesApi
class LoginFragment : Fragment() {
private var _binding: LoginBinding? = null
private val binding get() = _binding!!
@@ -54,7 +56,7 @@ class LoginFragment : Fragment() {
}
private fun setupObservers() {
- loginViewModel.loginState.observe(this) { result ->
+ loginViewModel.loginState.observe(viewLifecycleOwner) { result ->
Log.d("LoginFragment", result.toString())
when (result) {
LoginViewModel.LoginState.Loading -> {