From 554dfff4ade772f422f37f48a29b4844984c2ac1 Mon Sep 17 00:00:00 2001 From: Balazs Toldi Date: Tue, 24 Oct 2023 18:51:32 +0200 Subject: [PATCH] Always add the access token to the retrofit holder This hopefully eliminates any login related issues on Lemmy 0.19 --- .../eu/toldi/infinityforlemmy/activities/MainActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/toldi/infinityforlemmy/activities/MainActivity.java b/app/src/main/java/eu/toldi/infinityforlemmy/activities/MainActivity.java index 26f4ccc5..d3e84ef8 100644 --- a/app/src/main/java/eu/toldi/infinityforlemmy/activities/MainActivity.java +++ b/app/src/main/java/eu/toldi/infinityforlemmy/activities/MainActivity.java @@ -336,9 +336,8 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb fragmentManager = getSupportFragmentManager(); mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null); - if (mCurrentAccountSharedPreferences.getBoolean(SharedPreferencesUtils.BEARER_TOKEN_AUTH, true)) { - mRetrofit.setAccessToken(mAccessToken); - } + mRetrofit.setAccessToken(mAccessToken); + mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null); mAccountQualifiedName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_QUALIFIED_NAME, null);