From 03a9cd1bba880352ca0298cfacd18c394c6dea32 Mon Sep 17 00:00:00 2001 From: opyale Date: Sat, 18 Apr 2020 04:51:58 +0000 Subject: [PATCH] Adding ability to login again when version check failes. (#417) add own error message for this Merge branch 'master' into login-fix Merge branch 'master' into login-fix Merge branch 'master' into login-fix Adding ability to login again when version check failes. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@noreply.gitea.io> Co-authored-by: opyale Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/417 Reviewed-by: M M Arif --- .../main/java/org/mian/gitnex/activities/LoginActivity.java | 3 +++ app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java index 4fdf828a..47cd4f0d 100644 --- a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java @@ -511,6 +511,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener public void onFailure(@NonNull Call callVersion, Throwable t) { Log.e("onFailure-version", t.toString()); + SnackBar.error(getApplicationContext(), layoutView, getResources().getString(R.string.errorOnLogin)); + enableProcessButton(); + loginButton.setText(R.string.btnLogin); } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index abc87fb4..8d664591 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -618,6 +618,8 @@ Open Closed + We cannot reach the server, please check your server status + Crash Reports Enable Crash Reports GitNex has stopped :(