diff --git a/app/build.gradle b/app/build.gradle index fe982d8..03301a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { minSdkVersion 21 targetSdkVersion 30 - versionCode 15 - versionName "1.4.0" + versionCode 16 + versionName "1.4.1" multiDexEnabled true testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/fdroid_acad/play/release-notes/en-US/default.txt b/app/src/fdroid_acad/play/release-notes/en-US/default.txt index 6100b87..68b543d 100644 --- a/app/src/fdroid_acad/play/release-notes/en-US/default.txt +++ b/app/src/fdroid_acad/play/release-notes/en-US/default.txt @@ -1 +1 @@ -- Quelques améliorations \ No newline at end of file +- Corrige un bug lors de la connexion \ No newline at end of file diff --git a/app/src/fdroid_full/play/release-notes/en-US/default.txt b/app/src/fdroid_full/play/release-notes/en-US/default.txt index 90d6d8c..1902cc9 100644 --- a/app/src/fdroid_full/play/release-notes/en-US/default.txt +++ b/app/src/fdroid_full/play/release-notes/en-US/default.txt @@ -1,3 +1 @@ -- Sepia search -- Some fixes with overlay -- Fix issue when changing the instance +- Fix an issue with the authentication of some accounts \ No newline at end of file diff --git a/app/src/main/java/app/fedilab/fedilabtube/LoginActivity.java b/app/src/main/java/app/fedilab/fedilabtube/LoginActivity.java index 29fb907..a30552b 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/LoginActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/LoginActivity.java @@ -134,6 +134,7 @@ public class LoginActivity extends AppCompatActivity { String[] emailArray = login_uid.getText().toString().split("@"); if (emailArray.length > 1 && !Arrays.asList(Helper.valideEmails).contains(emailArray[1])) { Toasty.error(LoginActivity.this, getString(R.string.email_error_domain, emailArray[1])).show(); + connectionButton.setEnabled(true); return; } host = emailArray[1]; @@ -141,6 +142,7 @@ public class LoginActivity extends AppCompatActivity { } else { if (login_instance == null || login_instance.getText() == null || login_instance.getText().toString().trim().length() == 0) { Toasty.error(LoginActivity.this, getString(R.string.not_valide_instance)).show(); + connectionButton.setEnabled(true); return; } instance = host = login_instance.getText().toString().trim().toLowerCase(); @@ -215,6 +217,7 @@ public class LoginActivity extends AppCompatActivity { } catch (Error error) { Error.displayError(LoginActivity.this, error); error.printStackTrace(); + runOnUiThread(() -> connectionButton.setEnabled(true)); } } }).start(); diff --git a/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java b/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java index e9d5549..45b0b76 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java +++ b/app/src/main/java/app/fedilab/fedilabtube/MainActivity.java @@ -226,14 +226,16 @@ public class MainActivity extends AppCompatActivity { editor.putString(Helper.PREF_KEY_NAME, account.getUsername()); //Sync languages from server List videoLanguageServer = userMe.getVideoLanguages(); - Set videoLanguageServerSet = new TreeSet<>(videoLanguageServer); - videoLanguageServerSet.addAll(videoLanguageServer); - Set videoLanguageLocal = sharedpreferences.getStringSet(getString(R.string.set_video_language_choice), null); - if (videoLanguageServerSet.size() > 0 && videoLanguageLocal != null) { - videoLanguageServer.addAll(videoLanguageLocal); + if( videoLanguageServer != null) { + Set videoLanguageServerSet = new TreeSet<>(videoLanguageServer); + videoLanguageServerSet.addAll(videoLanguageServer); + Set videoLanguageLocal = sharedpreferences.getStringSet(getString(R.string.set_video_language_choice), null); + if (videoLanguageServerSet.size() > 0 && videoLanguageLocal != null) { + videoLanguageServer.addAll(videoLanguageLocal); + } + editor.putStringSet(getString(R.string.set_video_language_choice), videoLanguageServerSet); + editor.apply(); } - editor.putStringSet(getString(R.string.set_video_language_choice), videoLanguageServerSet); - editor.apply(); } } catch (Error error) { error.printStackTrace();