diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java index 67d3301f..d9df88d2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java @@ -33,7 +33,6 @@ import javax.inject.Named; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; -import ml.docilealligator.infinityforreddit.account.Account; import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.databinding.ActivityCustomizePostFilterBinding; import ml.docilealligator.infinityforreddit.postfilter.PostFilter; @@ -55,7 +54,6 @@ public class CustomizePostFilterActivity extends BaseActivity { private static final String POST_FILTER_STATE = "PFS"; private static final String ORIGINAL_NAME_STATE = "ONS"; private static final int ADD_SUBREDDITS_REQUEST_CODE = 1; - private static final int ADD_SUBREDDITS_ANONYMOUS_REQUEST_CODE = 2; private static final int ADD_USERS_REQUEST_CODE = 3; @Inject @@ -133,15 +131,8 @@ public class CustomizePostFilterActivity extends BaseActivity { }); binding.addSubredditsImageViewCustomizePostFilterActivity.setOnClickListener(view -> { - if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - Intent intent = new Intent(this, SearchActivity.class); - intent.putExtra(SearchActivity.EXTRA_SEARCH_ONLY_SUBREDDITS, true); - intent.putExtra(SearchActivity.EXTRA_IS_MULTI_SELECTION, true); - startActivityForResult(intent, ADD_SUBREDDITS_ANONYMOUS_REQUEST_CODE); - } else { - Intent intent = new Intent(this, SubredditMultiselectionActivity.class); - startActivityForResult(intent, ADD_SUBREDDITS_REQUEST_CODE); - } + Intent intent = new Intent(this, SubredditMultiselectionActivity.class); + startActivityForResult(intent, ADD_SUBREDDITS_REQUEST_CODE); }); binding.addUsersImageViewCustomizePostFilterActivity.setOnClickListener(view -> { @@ -515,9 +506,6 @@ public class CustomizePostFilterActivity extends BaseActivity { if (requestCode == ADD_SUBREDDITS_REQUEST_CODE) { ArrayList<String> subredditNames = data.getStringArrayListExtra(SubredditMultiselectionActivity.EXTRA_RETURN_SELECTED_SUBREDDITS); updateExcludeSubredditNames(subredditNames); - } else if (requestCode == ADD_SUBREDDITS_ANONYMOUS_REQUEST_CODE) { - ArrayList<String> subredditNames = data.getStringArrayListExtra(SearchActivity.RETURN_EXTRA_SELECTED_SUBREDDIT_NAMES); - updateExcludeSubredditNames(subredditNames); } else if (requestCode == ADD_USERS_REQUEST_CODE) { ArrayList<String> usernames = data.getStringArrayListExtra(SearchActivity.RETURN_EXTRA_SELECTED_USERNAMES); String currentUsers = binding.excludesUsersTextInputEditTextCustomizePostFilterActivity.getText().toString().trim(); |