mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-06 18:57:26 +01:00
LoginActivity password max length
This commit is contained in:
parent
442310cad3
commit
20c317b63f
@ -139,9 +139,9 @@ public class LoginActivity extends BaseActivity {
|
||||
Log.i("LoginActivity", "Login button clicked");
|
||||
loginButton.setEnabled(false);
|
||||
progressBar.setVisibility(ProgressBar.VISIBLE);
|
||||
String username = username_input.getText().toString();
|
||||
String instance = correctURL(instance_input.getText().toString());
|
||||
if(!Patterns.WEB_URL.matcher(instance).matches()){
|
||||
String username = username_input.getText().toString().trim();
|
||||
String instance = correctURL(instance_input.getText().toString().trim());
|
||||
if (!Patterns.WEB_URL.matcher(instance).matches()) {
|
||||
instance_input.setError("Invalid instance URL");
|
||||
Toast.makeText(LoginActivity.this, "Invalid instance URL", Toast.LENGTH_SHORT).show();
|
||||
loginButton.setEnabled(true);
|
||||
@ -149,7 +149,7 @@ public class LoginActivity extends BaseActivity {
|
||||
return;
|
||||
}
|
||||
Log.i("LoginActivity", "Instance: " + instance);
|
||||
AccountLoginDTO accountLoginDTO = new AccountLoginDTO(username,password_input.getText().toString(),token_2fa_input.getText().toString());
|
||||
AccountLoginDTO accountLoginDTO = new AccountLoginDTO(username, password_input.getText().toString(), token_2fa_input.getText().toString());
|
||||
mRetrofit.setBaseURL(instance);
|
||||
LemmyAPI api = mRetrofit.getRetrofit().create(LemmyAPI.class);
|
||||
Call<String> accessTokenCall = api.userLogin(accountLoginDTO);
|
||||
|
@ -90,6 +90,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/user_password"
|
||||
android:maxLength="60"
|
||||
android:maxLines="1"
|
||||
android:password="true" />
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user