mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-27 19:38:22 +01:00
Move mAccessToken and mAccountName initialization upper (#841)
This commit is contained in:
parent
2bc9034c89
commit
926e50090e
@ -153,8 +153,11 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
setToolbarGoToTop(toolbar);
|
||||
|
||||
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
|
||||
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
|
||||
name = getIntent().getStringExtra(EXTRA_NAME);
|
||||
postType = getIntent().getIntExtra(EXTRA_POST_TYPE, PostPagingSource.TYPE_FRONT_PAGE);
|
||||
|
||||
int filter = getIntent().getIntExtra(EXTRA_FILTER, -1000);
|
||||
PostFilter postFilter = new PostFilter();
|
||||
postFilter.allowNSFW = !mSharedPreferences.getBoolean(SharedPreferencesUtils.DISABLE_NSFW_FOREVER, false) && mNsfwAndSpoilerSharedPreferences.getBoolean((mAccountName == null || mAccountName.equals("-") ? "" : mAccountName) + SharedPreferencesUtils.NSFW_BASE, false);
|
||||
@ -224,9 +227,6 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
|
||||
}
|
||||
}
|
||||
|
||||
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
|
||||
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
mFragment = (PostFragment) getSupportFragmentManager().getFragment(savedInstanceState, FRAGMENT_OUT_STATE);
|
||||
getSupportFragmentManager().beginTransaction().replace(R.id.frame_layout_filtered_posts_activity, mFragment).commit();
|
||||
|
Loading…
Reference in New Issue
Block a user