aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-03-10 21:03:52 -0600
committerIván Ávalos <avalos@disroot.org>2022-03-10 21:03:52 -0600
commit620cd5b1e2782adfd57660017878013f2fb896bd (patch)
treed48cce2eb3e21f5f06d6a67afea057e93831f72b /androidApp/src/main/java/mx/trackermap/TrackerMap
parent18987c3b31c2b8fe1a911297e8b104d583dd5c83 (diff)
downloadetbsa-trackermap-mobile-620cd5b1e2782adfd57660017878013f2fb896bd.tar.gz
etbsa-trackermap-mobile-620cd5b1e2782adfd57660017878013f2fb896bd.tar.bz2
etbsa-trackermap-mobile-620cd5b1e2782adfd57660017878013f2fb896bd.zip
Updated Android libraries
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/session/LoginFragment.kt10
1 files changed, 5 insertions, 5 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 c855f44..6a30789 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
@@ -58,10 +58,10 @@ class LoginFragment : Fragment() {
setupEvents()
setupObservers()
- broadcastManager = LocalBroadcastManager.getInstance(activity!!)
+ broadcastManager = LocalBroadcastManager.getInstance(requireActivity())
binding.urlEditText.setText(
PreferenceManager
- .getDefaultSharedPreferences(activity)
+ .getDefaultSharedPreferences(requireActivity())
.getString(
PREFERENCE_SERVER_URL,
getString(R.string.default_server_url)
@@ -93,7 +93,7 @@ class LoginFragment : Fragment() {
binding.passwordEditText.text.toString(),
binding.urlEditText.text.toString(),
PreferenceManager
- .getDefaultSharedPreferences(activity)
+ .getDefaultSharedPreferences(requireActivity())
.getString(PREFERENCE_TOKEN, null)
)
}
@@ -127,7 +127,7 @@ class LoginFragment : Fragment() {
}
SessionController.LoginState.Success -> {
PreferenceManager
- .getDefaultSharedPreferences(activity)
+ .getDefaultSharedPreferences(requireActivity())
.edit()
.putString(PREFERENCE_SERVER_URL, binding.urlEditText.text.toString())
.apply()
@@ -148,7 +148,7 @@ class LoginFragment : Fragment() {
override fun onReceive(p0: Context?, p1: Intent?) {
p1?.getStringExtra(KEY_TOKEN)?.let { token ->
PreferenceManager
- .getDefaultSharedPreferences(activity)
+ .getDefaultSharedPreferences(requireActivity())
.edit()
.putString(PREFERENCE_TOKEN, token)
.apply()