mirror of
https://codeberg.org/gitnex/GitNex.git
synced 2024-12-16 15:48:13 +08:00
Remember-login-type (#394)
Merge branch 'master' into 372-remember-login-type # Conflicts: # app/src/main/java/org/mian/gitnex/activities/LoginActivity.java Use strings instead of boolean Remember login type Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/394
This commit is contained in:
parent
e709aba3c2
commit
3a524c9f5d
@ -111,7 +111,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
|
|
||||||
info_button.setOnClickListener(infoListener);
|
info_button.setOnClickListener(infoListener);
|
||||||
|
|
||||||
if(tinyDb.getBoolean("loginType")) { // username/password
|
if(tinyDb.getString("loginType").equals("basic")) { // username/password
|
||||||
|
|
||||||
loginMethod.check(R.id.loginUsernamePassword);
|
loginMethod.check(R.id.loginUsernamePassword);
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
|
|
||||||
if(loginMethodType == R.id.loginUsernamePassword) {
|
if(loginMethodType == R.id.loginUsernamePassword) {
|
||||||
|
|
||||||
tinyDb.putBoolean("loginType", true);
|
tinyDb.putString("loginType", "basic");
|
||||||
|
|
||||||
if(instanceUrl.contains("@")) {
|
if(instanceUrl.contains("@")) {
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
tinyDb.putBoolean("loginType", false);
|
tinyDb.putString("loginType", "token");
|
||||||
|
|
||||||
String instanceHost;
|
String instanceHost;
|
||||||
if(AppUtil.httpCheck(instanceUrl)) {
|
if(AppUtil.httpCheck(instanceUrl)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user