diff options
author | Anatolii Afanasev <tafanasyev@gmail.com> | 2022-08-05 00:53:20 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-05 00:53:20 +0000 |
commit | 926e50090ed39b7683bb6b3155d06883cd30fb98 (patch) | |
tree | 0f8a7adeb53f8e76159804f65fdf75d09e2ece23 | |
parent | 2bc9034c89154b018a70bc702d908e5d48d56d38 (diff) | |
download | infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.tar infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.tar.gz infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.tar.bz2 infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.tar.lz infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.tar.xz infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.tar.zst infinity-for-reddit-926e50090ed39b7683bb6b3155d06883cd30fb98.zip |
Move mAccessToken and mAccountName initialization upper (#841)
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java index 601063fb..36438c02 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/FilteredPostsActivity.java @@ -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(); |