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:
M M Arif 2020-04-12 19:15:20 +00:00
parent e709aba3c2
commit 3a524c9f5d

View File

@ -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)) {