mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-10 04:37:25 +01:00
parent
bf1036c919
commit
deaa4e596d
@ -181,6 +181,8 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele
|
||||
private SectionsPagerAdapter sectionsPagerAdapter;
|
||||
private String mAccessToken;
|
||||
private String mAccountName;
|
||||
|
||||
private String mAccountQalifiedName;
|
||||
private long postFragmentId;
|
||||
private int postListPosition;
|
||||
private int orientation;
|
||||
@ -269,6 +271,7 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele
|
||||
|
||||
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
|
||||
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
|
||||
mAccountQalifiedName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_QUALIFIED_NAME, null);
|
||||
|
||||
mVolumeKeysNavigateComments = mSharedPreferences.getBoolean(SharedPreferencesUtils.VOLUME_KEYS_NAVIGATE_COMMENTS, false);
|
||||
|
||||
@ -353,8 +356,8 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele
|
||||
|
||||
private void checkNewAccountAndBindView(Bundle savedInstanceState) {
|
||||
if (mNewAccountName != null) {
|
||||
if (mAccountName == null || !mAccountName.equals(mNewAccountName)) {
|
||||
SwitchAccount.switchAccount(mRedditDataRoomDatabase,mRetrofit, mCurrentAccountSharedPreferences,
|
||||
if (mAccountName == null || !mAccountQalifiedName.equals(mNewAccountName)) {
|
||||
SwitchAccount.switchAccount(mRedditDataRoomDatabase, mRetrofit, mCurrentAccountSharedPreferences,
|
||||
mExecutor, new Handler(), mNewAccountName, newAccount -> {
|
||||
EventBus.getDefault().post(new SwitchAccountEvent(getClass().getName()));
|
||||
Toast.makeText(this, R.string.account_switched, Toast.LENGTH_SHORT).show();
|
||||
|
Loading…
Reference in New Issue
Block a user