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