From 62aace4b9133c989cf3098dc1802e6a54b634d62 Mon Sep 17 00:00:00 2001 From: opyale Date: Tue, 30 Jun 2020 20:36:24 +0200 Subject: [PATCH] Fix old URLs which do not have a slash at the end. (#568) Merge branch 'master' into fix-older-urls Fix old URLs which do not have a slash at the end. Co-authored-by: opyale Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/568 Reviewed-by: M M Arif --- .../main/java/org/mian/gitnex/activities/BaseActivity.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main/java/org/mian/gitnex/activities/BaseActivity.java b/app/src/main/java/org/mian/gitnex/activities/BaseActivity.java index baef9cf5..be15f0f6 100644 --- a/app/src/main/java/org/mian/gitnex/activities/BaseActivity.java +++ b/app/src/main/java/org/mian/gitnex/activities/BaseActivity.java @@ -103,6 +103,11 @@ public abstract class BaseActivity extends AppCompatActivity { tinyDb.putString("cacheSizeImagesStr", getResources().getString(R.string.cacheSizeImagesSelectionSelectedText)); } + if(!tinyDb.getString("instanceUrlWithProtocol").endsWith("/")) { + + tinyDb.putString("instanceUrlWithProtocol", tinyDb.getString("instanceUrlWithProtocol") + "/"); + } + if (tinyDb.getBoolean("crashReportingEnabled")) { CoreConfigurationBuilder ACRABuilder = new CoreConfigurationBuilder(this);