mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 22:03:55 +01:00
changes lowercases calls to uppercase.
This commit is contained in:
parent
860854a940
commit
6def572c5e
1 changed files with 18 additions and 14 deletions
|
|
@ -146,7 +146,11 @@ class LoginActivity : AccountAuthenticatorActivity() {
|
||||||
loginTwoFactor.removeTextChangedListener(textWatcher)
|
loginTwoFactor.removeTextChangedListener(textWatcher)
|
||||||
}
|
}
|
||||||
delegate.onDestroy()
|
delegate.onDestroy()
|
||||||
loginClient?.cancel()
|
loginClient?.cancel() // This is already a safe call, so it's fine if it's null
|
||||||
|
loginClient?.let {
|
||||||
|
it.cancel()
|
||||||
|
}
|
||||||
|
|
||||||
binding = null
|
binding = null
|
||||||
super.onDestroy()
|
super.onDestroy()
|
||||||
}
|
}
|
||||||
|
|
@ -184,32 +188,32 @@ class LoginActivity : AccountAuthenticatorActivity() {
|
||||||
// if progressDialog is visible during the configuration change then store state as true else false so that
|
// if progressDialog is visible during the configuration change then store state as true else false so that
|
||||||
// we maintain visibility of progressDailog after configuration change
|
// we maintain visibility of progressDailog after configuration change
|
||||||
if (progressDialog != null && progressDialog!!.isShowing) {
|
if (progressDialog != null && progressDialog!!.isShowing) {
|
||||||
outState.putBoolean(saveProgressDailog, true)
|
outState.putBoolean(SAVEPROGRESSDAILOG, true)
|
||||||
} else {
|
} else {
|
||||||
outState.putBoolean(saveProgressDailog, false)
|
outState.putBoolean(SAVEPROGRESSDAILOG, false)
|
||||||
}
|
}
|
||||||
outState.putString(
|
outState.putString(
|
||||||
saveErrorMessage,
|
SAVEERRORMESSAGE,
|
||||||
binding!!.errorMessage.text.toString()
|
binding!!.errorMessage.text.toString()
|
||||||
) //Save the errorMessage
|
) //Save the errorMessage
|
||||||
outState.putString(
|
outState.putString(
|
||||||
saveUsername,
|
SAVEUSERNAME,
|
||||||
binding!!.loginUsername.text.toString()
|
binding!!.loginUsername.text.toString()
|
||||||
) // Save the username
|
) // Save the username
|
||||||
outState.putString(
|
outState.putString(
|
||||||
savePassword,
|
SAVEPASSWORD,
|
||||||
binding!!.loginPassword.text.toString()
|
binding!!.loginPassword.text.toString()
|
||||||
) // Save the password
|
) // Save the password
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
|
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
|
||||||
super.onRestoreInstanceState(savedInstanceState)
|
super.onRestoreInstanceState(savedInstanceState)
|
||||||
binding!!.loginUsername.setText(savedInstanceState.getString(saveUsername))
|
binding!!.loginUsername.setText(savedInstanceState.getString(SAVEUSERNAME))
|
||||||
binding!!.loginPassword.setText(savedInstanceState.getString(savePassword))
|
binding!!.loginPassword.setText(savedInstanceState.getString(SAVEPASSWORD))
|
||||||
if (savedInstanceState.getBoolean(saveProgressDailog)) {
|
if (savedInstanceState.getBoolean(SAVEPROGRESSDAILOG)) {
|
||||||
performLogin()
|
performLogin()
|
||||||
}
|
}
|
||||||
val errorMessage = savedInstanceState.getString(saveErrorMessage)
|
val errorMessage = savedInstanceState.getString(SAVEERRORMESSAGE)
|
||||||
if (sessionManager.isUserLoggedIn) {
|
if (sessionManager.isUserLoggedIn) {
|
||||||
showMessage(R.string.login_success, R.color.primaryDarkColor)
|
showMessage(R.string.login_success, R.color.primaryDarkColor)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -396,9 +400,9 @@ class LoginActivity : AccountAuthenticatorActivity() {
|
||||||
fun startYourself(context: Context) =
|
fun startYourself(context: Context) =
|
||||||
context.startActivity(Intent(context, LoginActivity::class.java))
|
context.startActivity(Intent(context, LoginActivity::class.java))
|
||||||
|
|
||||||
const val saveProgressDailog: String = "ProgressDailog_state"
|
const val SAVEPROGRESSDAILOG: String = "ProgressDailog_state"
|
||||||
const val saveErrorMessage: String = "errorMessage"
|
const val SAVEERRORMESSAGE: String = "errorMessage"
|
||||||
const val saveUsername: String = "username"
|
const val SAVEUSERNAME: String = "username"
|
||||||
const val savePassword: String = "password"
|
const val SAVEPASSWORD: String = "password"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue