Fix shortcut login issues

Fix issues with home screen shortcuts not logging the user in properly
This commit is contained in:
Balazs Toldi 2024-01-04 19:12:18 +01:00
parent 3dc94a05c7
commit b69245aedc
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58

View File

@ -392,6 +392,14 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
mAccountQualifiedName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_QUALIFIED_NAME, null);
if (mAccessToken != null) {
mRetrofit.setAccessToken(mAccessToken);
}
String instance = (mAccessToken == null) ? mSharedPreferences.getString(SharedPreferencesUtils.ANONYMOUS_ACCOUNT_INSTANCE, APIUtils.API_BASE_URI) : mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_INSTANCE, null);
if (instance != null) {
mRetrofit.setBaseURL(instance);
}
if (savedInstanceState == null) {
mMessageFullname = getIntent().getIntExtra(EXTRA_MESSAGE_FULLNAME, 0);
mNewAccountName = getIntent().getStringExtra(EXTRA_NEW_ACCOUNT_NAME);