From 23d3ba7f422bb76c32205f3b777b58a689ac9122 Mon Sep 17 00:00:00 2001 From: M M Arif Date: Thu, 3 Sep 2020 19:26:24 +0200 Subject: [PATCH] Fix crash on token logins with Require signin view enabled (#678) Fix crash on token logins with Require signin view enabled Co-authored-by: M M Arif Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/678 --- .../java/org/mian/gitnex/activities/AddNewAccountActivity.java | 2 +- app/src/main/java/org/mian/gitnex/activities/LoginActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/activities/AddNewAccountActivity.java b/app/src/main/java/org/mian/gitnex/activities/AddNewAccountActivity.java index c222e0f5..ccd3fbe3 100644 --- a/app/src/main/java/org/mian/gitnex/activities/AddNewAccountActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/AddNewAccountActivity.java @@ -127,7 +127,7 @@ public class AddNewAccountActivity extends BaseActivity { Call callVersion; - callVersion = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().getGiteaVersionWithToken(loginToken); + callVersion = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().getGiteaVersionWithToken("token " + loginToken); callVersion.enqueue(new Callback() { 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 c2390f82..1e61c4cf 100644 --- a/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/LoginActivity.java @@ -256,7 +256,7 @@ public class LoginActivity extends BaseActivity { if(!loginToken.equals("")) { - callVersion = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().getGiteaVersionWithToken(loginToken); + callVersion = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().getGiteaVersionWithToken("token " + loginToken); } else {