aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/AndroidManifest.xml12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java3
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterPreferenceActivity.java125
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterUsageListingActivity.java18
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java19
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageEmbeddedRecyclerViewAdapter.java79
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterWithUsageRecyclerViewAdapter.java80
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterOptionsBottomSheetFragment.java63
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostFilterOptionsBottomSheetFragment.java25
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsage.java13
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsageViewModel.java38
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilter.java11
-rw-r--r--app/src/main/res/layout/activity_comment_filter_preference.xml52
-rw-r--r--app/src/main/res/layout/activity_comment_filter_usage_listing.xml9
-rw-r--r--app/src/main/res/layout/activity_customize_comment_filter.xml9
-rw-r--r--app/src/main/res/layout/fragment_comment_filter_options_bottom_sheet.xml70
-rw-r--r--app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml2
-rw-r--r--app/src/main/res/layout/item_comment_filter_usage_embedded.xml9
-rw-r--r--app/src/main/res/layout/item_comment_filter_with_usage.xml28
-rw-r--r--app/src/main/res/values-cs/strings.xml2
-rw-r--r--app/src/main/res/values-de/strings.xml2
-rw-r--r--app/src/main/res/values-el/strings.xml2
-rw-r--r--app/src/main/res/values-es/strings.xml2
-rw-r--r--app/src/main/res/values-fr/strings.xml2
-rw-r--r--app/src/main/res/values-hi/strings.xml2
-rw-r--r--app/src/main/res/values-hu/strings.xml2
-rw-r--r--app/src/main/res/values-it/strings.xml2
-rw-r--r--app/src/main/res/values-ja/strings.xml2
-rw-r--r--app/src/main/res/values-nl/strings.xml2
-rw-r--r--app/src/main/res/values-pl/strings.xml2
-rw-r--r--app/src/main/res/values-pt-rBR/strings.xml2
-rw-r--r--app/src/main/res/values-pt/strings.xml2
-rw-r--r--app/src/main/res/values-ro/strings.xml2
-rw-r--r--app/src/main/res/values-ru/strings.xml2
-rw-r--r--app/src/main/res/values-tr-rTR/strings.xml2
-rw-r--r--app/src/main/res/values-uk/strings.xml2
-rw-r--r--app/src/main/res/values-vi/strings.xml2
-rw-r--r--app/src/main/res/values-zh-rCN/strings.xml2
-rw-r--r--app/src/main/res/values/strings.xml2
40 files changed, 669 insertions, 42 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 7579b0bb..9591a025 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -23,8 +23,7 @@
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
-
- <uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
+ <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:name=".Infinity"
@@ -37,6 +36,15 @@
android:usesCleartextTraffic="true"
tools:replace="android:label">
<activity
+ android:name=".activities.CommentFilterUsageListingActivity"
+ android:exported="false" />
+ <activity
+ android:name=".activities.CustomizeCommentFilterActivity"
+ android:exported="false" />
+ <activity
+ android:name=".activities.CommentFilterPreferenceActivity"
+ android:exported="false" />
+ <activity
android:name=".activities.HistoryActivity"
android:exported="false"
android:label="@string/history_activity_label"
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java
index 2bf647ec..b4cb2444 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java
@@ -9,6 +9,7 @@ import dagger.Component;
import ml.docilealligator.infinityforreddit.activities.AccountPostsActivity;
import ml.docilealligator.infinityforreddit.activities.AccountSavedThingActivity;
import ml.docilealligator.infinityforreddit.activities.CommentActivity;
+import ml.docilealligator.infinityforreddit.activities.CommentFilterPreferenceActivity;
import ml.docilealligator.infinityforreddit.activities.CreateMultiRedditActivity;
import ml.docilealligator.infinityforreddit.activities.CustomThemeListingActivity;
import ml.docilealligator.infinityforreddit.activities.CustomThemePreviewActivity;
@@ -307,6 +308,8 @@ public interface AppComponent {
void inject(MorePostsInfoFragment morePostsInfoFragment);
+ void inject(CommentFilterPreferenceActivity commentFilterPreferenceActivity);
+
@Component.Factory
interface Factory {
AppComponent create(@BindsInstance Application application);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java
index 6c559df3..e89a47dd 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java
@@ -14,7 +14,9 @@ import androidx.sqlite.db.SupportSQLiteDatabase;
import ml.docilealligator.infinityforreddit.account.Account;
import ml.docilealligator.infinityforreddit.account.AccountDao;
import ml.docilealligator.infinityforreddit.commentfilter.CommentFilter;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterDao;
import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterUsage;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterUsageDao;
import ml.docilealligator.infinityforreddit.customtheme.CustomTheme;
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeDao;
import ml.docilealligator.infinityforreddit.multireddit.AnonymousMultiredditSubreddit;
@@ -80,6 +82,10 @@ public abstract class RedditDataRoomDatabase extends RoomDatabase {
public abstract AnonymousMultiredditSubredditDao anonymousMultiredditSubredditDao();
+ public abstract CommentFilterDao commentFilterDao();
+
+ public abstract CommentFilterUsageDao commentFilterUsageDao();
+
private static final Migration MIGRATION_1_2 = new Migration(1, 2) {
@Override
public void migrate(SupportSQLiteDatabase database) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterPreferenceActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterPreferenceActivity.java
new file mode 100644
index 00000000..aaddff6e
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterPreferenceActivity.java
@@ -0,0 +1,125 @@
+package ml.docilealligator.infinityforreddit.activities;
+
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.MenuItem;
+
+import androidx.annotation.NonNull;
+import androidx.lifecycle.ViewModelProvider;
+
+import java.util.concurrent.Executor;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Infinity;
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+import ml.docilealligator.infinityforreddit.adapters.CommentFilterWithUsageRecyclerViewAdapter;
+import ml.docilealligator.infinityforreddit.bottomsheetfragments.CommentFilterOptionsBottomSheetFragment;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilter;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterWithUsageViewModel;
+import ml.docilealligator.infinityforreddit.commentfilter.DeleteCommentFilter;
+import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
+import ml.docilealligator.infinityforreddit.databinding.ActivityCommentFilterPreferenceBinding;
+
+public class CommentFilterPreferenceActivity extends BaseActivity {
+
+ private ActivityCommentFilterPreferenceBinding binding;
+
+ @Inject
+ @Named("default")
+ SharedPreferences sharedPreferences;
+ @Inject
+ RedditDataRoomDatabase redditDataRoomDatabase;
+ @Inject
+ CustomThemeWrapper customThemeWrapper;
+ @Inject
+ Executor executor;
+ public CommentFilterWithUsageViewModel commentFilterWithUsageViewModel;
+ private CommentFilterWithUsageRecyclerViewAdapter adapter;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ ((Infinity) getApplication()).getAppComponent().inject(this);
+
+ setImmersiveModeNotApplicable();
+
+ super.onCreate(savedInstanceState);
+ binding = ActivityCommentFilterPreferenceBinding.inflate(getLayoutInflater());
+
+ setContentView(binding.getRoot());
+
+ ButterKnife.bind(this);
+
+ applyCustomTheme();
+
+ setSupportActionBar(binding.toolbarCommentFilterPreferenceActivity);
+ getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+
+ binding.fabCommentFilterPreferenceActivity.setOnClickListener(view -> {
+ Intent intent = new Intent(this, CustomizeCommentFilterActivity.class);
+ intent.putExtra(CustomizeCommentFilterActivity.EXTRA_FROM_SETTINGS, true);
+ startActivity(intent);
+ });
+
+ adapter = new CommentFilterWithUsageRecyclerViewAdapter(this, commentFilter -> {
+ CommentFilterOptionsBottomSheetFragment commentFilterOptionsBottomSheetFragment = new CommentFilterOptionsBottomSheetFragment();
+ Bundle bundle = new Bundle();
+ bundle.putParcelable(CommentFilterOptionsBottomSheetFragment.EXTRA_POST_FILTER, commentFilter);
+ commentFilterOptionsBottomSheetFragment.setArguments(bundle);
+ commentFilterOptionsBottomSheetFragment.show(getSupportFragmentManager(), commentFilterOptionsBottomSheetFragment.getTag());
+ });
+
+ binding.recyclerViewCommentFilterPreferenceActivity.setAdapter(adapter);
+
+ commentFilterWithUsageViewModel = new ViewModelProvider(this,
+ new CommentFilterWithUsageViewModel.Factory(redditDataRoomDatabase)).get(CommentFilterWithUsageViewModel.class);
+
+ commentFilterWithUsageViewModel.getCommentFilterWithUsageListLiveData().observe(this, commentFilterWithUsages -> adapter.setCommentFilterWithUsageList(commentFilterWithUsages));
+ }
+
+ public void editCommentFilter(CommentFilter commentFilter) {
+ Intent intent = new Intent(this, CustomizeCommentFilterActivity.class);
+ intent.putExtra(CustomizeCommentFilterActivity.EXTRA_POST_FILTER, commentFilter);
+ intent.putExtra(CustomizeCommentFilterActivity.EXTRA_FROM_SETTINGS, true);
+ startActivity(intent);
+ }
+
+ public void applyCommentFilterTo(CommentFilter commentFilter) {
+ Intent intent = new Intent(this, CommentFilterUsageListingActivity.class);
+ intent.putExtra(CommentFilterUsageListingActivity.EXTRA_POST_FILTER, commentFilter);
+ startActivity(intent);
+ }
+
+ public void deleteCommentFilter(CommentFilter commentFilter) {
+ DeleteCommentFilter.deleteCommentFilter(redditDataRoomDatabase, executor, commentFilter);
+ }
+
+ @Override
+ protected SharedPreferences getDefaultSharedPreferences() {
+ return sharedPreferences;
+ }
+
+ @Override
+ protected CustomThemeWrapper getCustomThemeWrapper() {
+ return customThemeWrapper;
+ }
+
+ @Override
+ protected void applyCustomTheme() {
+ applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(binding.appbarLayoutCommentFilterPreferenceActivity, binding.collapsingToolbarLayoutCommentFilterPreferenceActivity, binding.toolbarCommentFilterPreferenceActivity);
+ applyFABTheme(binding.fabCommentFilterPreferenceActivity);
+ binding.getRoot().setBackgroundColor(customThemeWrapper.getBackgroundColor());
+ }
+
+ @Override
+ public boolean onOptionsItemSelected(@NonNull MenuItem item) {
+ if (item.getItemId() == android.R.id.home) {
+ finish();
+ return true;
+ }
+ return false;
+ }
+} \ No newline at end of file
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterUsageListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterUsageListingActivity.java
new file mode 100644
index 00000000..587addcf
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentFilterUsageListingActivity.java
@@ -0,0 +1,18 @@
+package ml.docilealligator.infinityforreddit.activities;
+
+import android.os.Bundle;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import ml.docilealligator.infinityforreddit.R;
+
+public class CommentFilterUsageListingActivity extends AppCompatActivity {
+
+ public static final String EXTRA_POST_FILTER = "EPF";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_comment_filter_usage_listing);
+ }
+} \ No newline at end of file
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
new file mode 100644
index 00000000..68a31b6f
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizeCommentFilterActivity.java
@@ -0,0 +1,19 @@
+package ml.docilealligator.infinityforreddit.activities;
+
+import android.os.Bundle;
+
+import androidx.appcompat.app.AppCompatActivity;
+
+import ml.docilealligator.infinityforreddit.R;
+
+public class CustomizeCommentFilterActivity extends AppCompatActivity {
+
+ public static final String EXTRA_POST_FILTER = "EPF";
+ public static final String EXTRA_FROM_SETTINGS = "EFS";
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_customize_comment_filter);
+ }
+} \ No newline at end of file
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageEmbeddedRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageEmbeddedRecyclerViewAdapter.java
new file mode 100644
index 00000000..5d1ad217
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageEmbeddedRecyclerViewAdapter.java
@@ -0,0 +1,79 @@
+package ml.docilealligator.infinityforreddit.adapters;
+
+import android.view.LayoutInflater;
+import android.view.ViewGroup;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.List;
+
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.activities.BaseActivity;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterUsage;
+import ml.docilealligator.infinityforreddit.databinding.ItemCommentFilterUsageEmbeddedBinding;
+
+public class CommentFilterUsageEmbeddedRecyclerViewAdapter extends RecyclerView.Adapter<CommentFilterUsageEmbeddedRecyclerViewAdapter.EntryViewHolder> {
+ private BaseActivity baseActivity;
+ private List<CommentFilterUsage> commentFilterUsageList;
+
+ public CommentFilterUsageEmbeddedRecyclerViewAdapter(BaseActivity baseActivity) {
+ this.baseActivity = baseActivity;
+ }
+
+ @NonNull
+ @Override
+ public EntryViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ return new EntryViewHolder(ItemCommentFilterUsageEmbeddedBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull EntryViewHolder holder, int position) {
+ if (commentFilterUsageList == null || commentFilterUsageList.isEmpty()) {
+ holder.textView.setText(R.string.click_to_apply_post_filter);
+ } else if (holder.getBindingAdapterPosition() > 4) {
+ holder.textView.setText(baseActivity.getString(R.string.post_filter_usage_embedded_more_count, commentFilterUsageList.size() - 5));
+ } else {
+ CommentFilterUsage commentFilterUsage = commentFilterUsageList.get(holder.getBindingAdapterPosition());
+ switch (commentFilterUsage.usage) {
+ case CommentFilterUsage.SUBREDDIT_TYPE:
+ holder.textView.setText("r/" + commentFilterUsage.nameOfUsage);
+ break;
+ case CommentFilterUsage.USER_TYPE:
+ holder.textView.setText("u/" + commentFilterUsage.nameOfUsage);
+ break;
+ }
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ return commentFilterUsageList == null || commentFilterUsageList.isEmpty() ? 1 : (commentFilterUsageList.size() > 5 ? 6 : commentFilterUsageList.size());
+ }
+
+ public void setCommentFilterUsageList(List<CommentFilterUsage> commentFilterUsageList) {
+ this.commentFilterUsageList = commentFilterUsageList;
+ notifyDataSetChanged();
+ }
+
+ class EntryViewHolder extends RecyclerView.ViewHolder {
+ TextView textView;
+
+ public EntryViewHolder(@NonNull ItemCommentFilterUsageEmbeddedBinding binding) {
+ super(binding.getRoot());
+ textView = binding.getRoot();
+
+ textView.setTextColor(baseActivity.customThemeWrapper.getSecondaryTextColor());
+
+ if (baseActivity.typeface != null) {
+ textView.setTypeface(baseActivity.typeface);
+ }
+
+ textView.setOnClickListener(view -> {
+ Toast.makeText(baseActivity, textView.getText(), Toast.LENGTH_SHORT).show();
+ });
+ }
+ }
+}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterWithUsageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterWithUsageRecyclerViewAdapter.java
new file mode 100644
index 00000000..48fd090f
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterWithUsageRecyclerViewAdapter.java
@@ -0,0 +1,80 @@
+package ml.docilealligator.infinityforreddit.adapters;
+
+import android.view.LayoutInflater;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.List;
+
+import ml.docilealligator.infinityforreddit.activities.BaseActivity;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilter;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterWithUsage;
+import ml.docilealligator.infinityforreddit.customviews.LinearLayoutManagerBugFixed;
+import ml.docilealligator.infinityforreddit.databinding.ItemCommentFilterWithUsageBinding;
+
+public class CommentFilterWithUsageRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
+ private BaseActivity activity;
+ private final OnItemClickListener onItemClickListener;
+ private List<CommentFilterWithUsage> commentFilterWithUsageList;
+ private RecyclerView.RecycledViewPool recycledViewPool;
+
+ public interface OnItemClickListener {
+ void onItemClick(CommentFilter commentFilter);
+ }
+
+ public CommentFilterWithUsageRecyclerViewAdapter(BaseActivity activity, OnItemClickListener onItemClickListener) {
+ this.activity = activity;
+ this.recycledViewPool = new RecyclerView.RecycledViewPool();
+ this.onItemClickListener = onItemClickListener;
+ }
+
+ @NonNull
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ return new CommentFilterViewHolder(ItemCommentFilterWithUsageBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false));
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+ if (holder instanceof CommentFilterViewHolder) {
+ ((CommentFilterViewHolder) holder).binding.commentFilterNameTextViewItemCommentFilter.setText(commentFilterWithUsageList.get(position - 1).commentFilter.name);
+ ((CommentFilterViewHolder) holder).adapter.setCommentFilterUsageList(commentFilterWithUsageList.get(position - 1).commentFilterUsageList);
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ return commentFilterWithUsageList == null ? 1 : 1 + commentFilterWithUsageList.size();
+ }
+
+ public void setCommentFilterWithUsageList(List<CommentFilterWithUsage> commentFilterWithUsageList) {
+ this.commentFilterWithUsageList = commentFilterWithUsageList;
+ notifyDataSetChanged();
+ }
+
+ private class CommentFilterViewHolder extends RecyclerView.ViewHolder {
+ ItemCommentFilterWithUsageBinding binding;
+ CommentFilterUsageEmbeddedRecyclerViewAdapter adapter;
+
+ public CommentFilterViewHolder(@NonNull ItemCommentFilterWithUsageBinding binding) {
+ super(binding.getRoot());
+ this.binding = binding;
+ binding.commentFilterNameTextViewItemCommentFilter.setTextColor(activity.customThemeWrapper.getPrimaryTextColor());
+
+ if (activity.typeface != null) {
+ binding.commentFilterNameTextViewItemCommentFilter.setTypeface(activity.typeface);
+ }
+
+ binding.getRoot().setOnClickListener(view -> {
+ onItemClickListener.onItemClick(commentFilterWithUsageList.get(getBindingAdapterPosition() - 1).commentFilter);
+ });
+
+ binding.commentFilterUsageRecyclerViewItemCommentFilter.setRecycledViewPool(recycledViewPool);
+ binding.commentFilterUsageRecyclerViewItemCommentFilter.setLayoutManager(new LinearLayoutManagerBugFixed(activity));
+ adapter = new CommentFilterUsageEmbeddedRecyclerViewAdapter(activity);
+ binding.commentFilterUsageRecyclerViewItemCommentFilter.setAdapter(adapter);
+ }
+ }
+}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterOptionsBottomSheetFragment.java
new file mode 100644
index 00000000..fd06d30e
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterOptionsBottomSheetFragment.java
@@ -0,0 +1,63 @@
+package ml.docilealligator.infinityforreddit.bottomsheetfragments;
+
+import android.content.Context;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.fragment.app.Fragment;
+
+import ml.docilealligator.infinityforreddit.R;
+import ml.docilealligator.infinityforreddit.activities.CommentFilterPreferenceActivity;
+import ml.docilealligator.infinityforreddit.commentfilter.CommentFilter;
+import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
+import ml.docilealligator.infinityforreddit.databinding.FragmentCommentFilterOptionsBottomSheetBinding;
+import ml.docilealligator.infinityforreddit.utils.Utils;
+
+public class CommentFilterOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
+
+ public static final String EXTRA_POST_FILTER = "EPF";
+ private CommentFilterPreferenceActivity activity;
+
+ public CommentFilterOptionsBottomSheetFragment() {
+ // Required empty public constructor
+ }
+
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container,
+ Bundle savedInstanceState) {
+ // Inflate the layout for this fragment
+ FragmentCommentFilterOptionsBottomSheetBinding binding = FragmentCommentFilterOptionsBottomSheetBinding.inflate(inflater, container, false);
+
+ CommentFilter commentFilter = getArguments().getParcelable(EXTRA_POST_FILTER);
+
+ binding.editTextViewCommentFilterOptionsBottomSheetFragment.setOnClickListener(view -> {
+ activity.editCommentFilter(commentFilter);
+ dismiss();
+ });
+
+ binding.applyToTextViewCommentFilterOptionsBottomSheetFragment.setOnClickListener(view -> {
+ activity.applyCommentFilterTo(commentFilter);
+ dismiss();
+ });
+
+ binding.deleteTextViewCommentFilterOptionsBottomSheetFragment.setOnClickListener(view -> {
+ activity.deleteCommentFilter(commentFilter);
+ dismiss();
+ });
+
+ if (activity.typeface != null) {
+ Utils.setFontToAllTextViews(binding.getRoot(), activity.typeface);
+ }
+
+ return binding.getRoot();
+ }
+
+ @Override
+ public void onAttach(@NonNull Context context) {
+ super.onAttach(context);
+ activity = (CommentFilterPreferenceActivity) context;
+ }
+} \ No newline at end of file
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostFilterOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostFilterOptionsBottomSheetFragment.java
index 268f82ba..049549d1 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostFilterOptionsBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostFilterOptionsBottomSheetFragment.java
@@ -5,26 +5,17 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.TextView;
import androidx.annotation.NonNull;
-import butterknife.BindView;
-import butterknife.ButterKnife;
-import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.activities.PostFilterPreferenceActivity;
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
+import ml.docilealligator.infinityforreddit.databinding.FragmentPostFilterOptionsBottomSheetBinding;
import ml.docilealligator.infinityforreddit.postfilter.PostFilter;
import ml.docilealligator.infinityforreddit.utils.Utils;
public class PostFilterOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
- @BindView(R.id.edit_text_view_post_filter_options_bottom_sheet_fragment)
- TextView editTextView;
- @BindView(R.id.apply_to_text_view_post_filter_options_bottom_sheet_fragment)
- TextView applyToTextView;
- @BindView(R.id.delete_text_view_post_filter_options_bottom_sheet_fragment)
- TextView deleteTextView;
public static final String EXTRA_POST_FILTER = "EPF";
private PostFilterPreferenceActivity activity;
@@ -36,32 +27,30 @@ public class PostFilterOptionsBottomSheetFragment extends LandscapeExpandedRound
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
- View rootView = inflater.inflate(R.layout.fragment_post_filter_options_bottom_sheet, container, false);
-
- ButterKnife.bind(this, rootView);
+ FragmentPostFilterOptionsBottomSheetBinding binding = FragmentPostFilterOptionsBottomSheetBinding.inflate(inflater, container, false);
PostFilter postFilter = getArguments().getParcelable(EXTRA_POST_FILTER);
- editTextView.setOnClickListener(view -> {
+ binding.editTextViewPostFilterOptionsBottomSheetFragment.setOnClickListener(view -> {
activity.editPostFilter(postFilter);
dismiss();
});
- applyToTextView.setOnClickListener(view -> {
+ binding.applyToTextViewPostFilterOptionsBottomSheetFragment.setOnClickListener(view -> {
activity.applyPostFilterTo(postFilter);
dismiss();
});
- deleteTextView.setOnClickListener(view -> {
+ binding.deleteTextViewPostFilterOptionsBottomSheetFragment.setOnClickListener(view -> {
activity.deletePostFilter(postFilter);
dismiss();
});
if (activity.typeface != null) {
- Utils.setFontToAllTextViews(rootView, activity.typeface);
+ Utils.setFontToAllTextViews(binding.getRoot(), activity.typeface);
}
- return rootView;
+ return binding.getRoot();
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsage.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsage.java
index 9ee9e856..670786a5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsage.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsage.java
@@ -1,5 +1,16 @@
package ml.docilealligator.infinityforreddit.commentfilter;
-public class CommentFilterWithUsage {
+import androidx.room.Embedded;
+import androidx.room.Relation;
+
+import java.util.List;
+public class CommentFilterWithUsage {
+ @Embedded
+ public CommentFilter commentFilter;
+ @Relation(
+ parentColumn = "name",
+ entityColumn = "name"
+ )
+ public List<CommentFilterUsage> commentFilterUsageList;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsageViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsageViewModel.java
new file mode 100644
index 00000000..fb8733fe
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterWithUsageViewModel.java
@@ -0,0 +1,38 @@
+package ml.docilealligator.infinityforreddit.commentfilter;
+
+import androidx.annotation.NonNull;
+import androidx.lifecycle.LiveData;
+import androidx.lifecycle.ViewModel;
+import androidx.lifecycle.ViewModelProvider;
+
+import java.util.List;
+
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+
+public class CommentFilterWithUsageViewModel extends ViewModel {
+ private LiveData<List<CommentFilterWithUsage>> mCommentFilterWithUsageListLiveData;
+
+ public CommentFilterWithUsageViewModel(RedditDataRoomDatabase redditDataRoomDatabase) {
+ mCommentFilterWithUsageListLiveData = redditDataRoomDatabase.commentFilterDao().getAllCommentFilterWithUsageLiveData();
+ }
+
+ public LiveData<List<CommentFilterWithUsage>> getCommentFilterWithUsageListLiveData() {
+ return mCommentFilterWithUsageListLiveData;
+ }
+
+ public static class Factory extends ViewModelProvider.NewInstanceFactory {
+
+ private final RedditDataRoomDatabase mRedditDataRoomDatabase;
+
+ public Factory(RedditDataRoomDatabase redditDataRoomDatabase) {
+ mRedditDataRoomDatabase = redditDataRoomDatabase;
+ }
+
+ @NonNull
+ @Override
+ public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
+ //noinspection unchecked
+ return (T) new CommentFilterWithUsageViewModel(mRedditDataRoomDatabase);
+ }
+ }
+}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilter.java
new file mode 100644
index 00000000..1fb18070
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilter.java
@@ -0,0 +1,11 @@
+package ml.docilealligator.infinityforreddit.commentfilter;
+
+import java.util.concurrent.Executor;
+
+import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
+
+public class DeleteCommentFilter {
+ public static void deleteCommentFilter(RedditDataRoomDatabase redditDataRoomDatabase, Executor executor, CommentFilter commentFilter) {
+ executor.execute(() -> redditDataRoomDatabase.commentFilterDao().deleteCommentFilter(commentFilter));
+ }
+}
diff --git a/app/src/main/res/layout/activity_comment_filter_preference.xml b/app/src/main/res/layout/activity_comment_filter_preference.xml
new file mode 100644
index 00000000..6f2b6051
--- /dev/null
+++ b/app/src/main/res/layout/activity_comment_filter_preference.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".activities.CommentFilterPreferenceActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/appbar_layout_comment_filter_preference_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <com.google.android.material.appbar.CollapsingToolbarLayout
+ android:id="@+id/collapsing_toolbar_layout_comment_filter_preference_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_scrollFlags="scroll|enterAlways"
+ app:titleEnabled="false"
+ app:toolbarId="@+id/toolbar_comment_filter_preference_activity">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_comment_filter_preference_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="?attr/actionBarSize"
+ app:popupTheme="@style/AppTheme.PopupOverlay"
+ app:navigationIcon="?attr/homeAsUpIndicator" />
+
+ </com.google.android.material.appbar.CollapsingToolbarLayout>
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_comment_filter_preference_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior" />
+
+ <com.google.android.material.floatingactionbutton.FloatingActionButton
+ android:id="@+id/fab_comment_filter_preference_activity"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_margin="@dimen/fab_margin"
+ android:layout_gravity="bottom|end"
+ app:backgroundTint="?attr/colorPrimaryLightTheme"
+ app:srcCompat="@drawable/ic_add_day_night_24dp"
+ app:tint="@android:color/white" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_comment_filter_usage_listing.xml b/app/src/main/res/layout/activity_comment_filter_usage_listing.xml
new file mode 100644
index 00000000..6b268520
--- /dev/null
+++ b/app/src/main/res/layout/activity_comment_filter_usage_listing.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".activities.CommentFilterUsageListingActivity">
+
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/activity_customize_comment_filter.xml b/app/src/main/res/layout/activity_customize_comment_filter.xml
new file mode 100644
index 00000000..fc6cbfd9
--- /dev/null
+++ b/app/src/main/res/layout/activity_customize_comment_filter.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ tools:context=".activities.CustomizeCommentFilterActivity">
+
+</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_comment_filter_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_comment_filter_options_bottom_sheet.xml
new file mode 100644
index 00000000..011f7d51
--- /dev/null
+++ b/app/src/main/res/layout/fragment_comment_filter_options_bottom_sheet.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
+ android:paddingBottom="8dp"
+ android:overScrollMode="never">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/edit_text_view_comment_filter_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/edit"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ app:drawableStartCompat="@drawable/ic_edit_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/apply_to_text_view_comment_filter_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/apply_to"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ app:drawableStartCompat="@drawable/ic_apply_to_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/delete_text_view_comment_filter_options_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/delete"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ app:drawableStartCompat="@drawable/ic_delete_24dp"
+ android:drawablePadding="48dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ </LinearLayout>
+
+</androidx.core.widget.NestedScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml
index a9c9310e..2fa19826 100644
--- a/app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml
+++ b/app/src/main/res/layout/fragment_post_filter_options_bottom_sheet.xml
@@ -33,7 +33,7 @@
android:id="@+id/apply_to_text_view_post_filter_options_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/apply_post_filter_to"
+ android:text="@string/apply_to"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
android:fontFamily="?attr/font_family"
diff --git a/app/src/main/res/layout/item_comment_filter_usage_embedded.xml b/app/src/main/res/layout/item_comment_filter_usage_embedded.xml
new file mode 100644
index 00000000..e156e968
--- /dev/null
+++ b/app/src/main/res/layout/item_comment_filter_usage_embedded.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:layout_marginStart="24dp"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:fontFamily="?attr/font_family" /> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_comment_filter_with_usage.xml b/app/src/main/res/layout/item_comment_filter_with_usage.xml
new file mode 100644
index 00000000..191db7bd
--- /dev/null
+++ b/app/src/main/res/layout/item_comment_filter_with_usage.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ml.docilealligator.infinityforreddit.customviews.InterceptTouchEventLinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="72dp"
+ android:paddingEnd="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground">
+
+ <TextView
+ android:id="@+id/comment_filter_name_text_view_item_comment_filter"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:fontFamily="?attr/font_family"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_16" />
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/comment_filter_usage_recycler_view_item_comment_filter"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:nestedScrollingEnabled="false" />
+
+</ml.docilealligator.infinityforreddit.customviews.InterceptTouchEventLinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index c2be9f03..e627ba0f 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -958,7 +958,7 @@ Zpráva: %2$s"</string>
<string name="post_filter_requires_a_name">"Jak se jmenuje tento filtr příspěvků?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' již existuje"</string>
<string name="duplicate_post_filter_dialog_message">"Chcete jej přepsat?"</string>
- <string name="apply_post_filter_to">"Použít na"</string>
+ <string name="apply_to">"Použít na"</string>
<string name="post_filter_usage_home">"Domů"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 72a09343..d536040e 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -991,7 +991,7 @@ Nachricht: %2$s"</string>
<string name="post_filter_requires_a_name">"Wie lautet der Name des Beitragsfilters?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' existiert bereits"</string>
<string name="duplicate_post_filter_dialog_message">"Überschreiben?"</string>
- <string name="apply_post_filter_to">"Anwenden auf"</string>
+ <string name="apply_to">"Anwenden auf"</string>
<string name="post_filter_usage_home">"Home"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 9a028320..b93471f4 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -902,7 +902,7 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="post_filter_requires_a_name">"Ποιο είναι το όνομα αυτού του φίλτρου ανάρτησης;"</string>
<string name="duplicate_post_filter_dialog_title">"%1$s Υπάρχουν Ήδη"</string>
<string name="duplicate_post_filter_dialog_message">"Παράκαμψη;"</string>
- <string name="apply_post_filter_to">"Εφαρμογή σε"</string>
+ <string name="apply_to">"Εφαρμογή σε"</string>
<string name="post_filter_usage_home">"Αρχική"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 0093680d..68c2e86a 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -1006,7 +1006,7 @@ Mensaje: %2$s"</string>
<string name="post_filter_requires_a_name">"¿Cuál es el nombre de este filtro de publicaciones?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' Ya Existe"</string>
<string name="duplicate_post_filter_dialog_message">"¿Sobrescribir?"</string>
- <string name="apply_post_filter_to">"Aplicar a"</string>
+ <string name="apply_to">"Aplicar a"</string>
<string name="post_filter_usage_home">"Inicio"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 77db201b..02a5419b 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -1061,7 +1061,7 @@ Les onglets pourraient perdre tout leur contenu quand vous passez d'un onglet à
<string name="post_filter_requires_a_name">"Quel est le nom de ce filtre de publication ?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' Existe déjà"</string>
<string name="duplicate_post_filter_dialog_message">"Le remplacer ?"</string>
- <string name="apply_post_filter_to">"Appliquer à"</string>
+ <string name="apply_to">"Appliquer à"</string>
<string name="post_filter_usage_home">"Acceuil"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-hi/strings.xml b/app/src/main/res/values-hi/strings.xml
index 53bea1b7..e01c1483 100644
--- a/app/src/main/res/values-hi/strings.xml
+++ b/app/src/main/res/values-hi/strings.xml
@@ -1030,7 +1030,7 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="post_filter_name_hint">"Post filter का नाम"</string>
<string name="post_filter_requires_a_name">"इस post filter का नाम क्या है?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' पहले से ही है"</string>
- <string name="apply_post_filter_to">"लागू करें"</string>
+ <string name="apply_to">"लागू करें"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
<string name="post_filter_usage_user">"User: %1$s"</string>
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 0171b1c0..a2d5a571 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -937,7 +937,7 @@ Videó autómatikus lejátszása le van tiltva."</string>
<string name="duplicate_post_filter_dialog_message">"Írja fölül?"</string>
<!-- Fuzzy -->
- <string name="apply_post_filter_to">"Alkalmazd"</string>
+ <string name="apply_to">"Alkalmazd"</string>
<string name="post_filter_usage_home">"Home"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 603beca2..e275f34f 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -906,7 +906,7 @@ Messaggio: %2$s"</string>
<string name="post_filter_requires_a_name">"Come vuoi chiamare questo filtro post?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' esiste già"</string>
<string name="duplicate_post_filter_dialog_message">"Vuoi sovrascriverlo?"</string>
- <string name="apply_post_filter_to">"Applica a"</string>
+ <string name="apply_to">"Applica a"</string>
<string name="post_filter_usage_home">"Home"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 27f23737..8953bb22 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -1033,7 +1033,7 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="min_awards_hint">"最小のアワード数 (-1: 制限なし)"</string>
<string name="duplicate_post_filter_dialog_title">"「%1$s 」は既に存在します"</string>
<string name="duplicate_post_filter_dialog_message">"上書きしますか?"</string>
- <string name="apply_post_filter_to">"適用"</string>
+ <string name="apply_to">"適用"</string>
<string name="post_filter_usage_home">"ホーム"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
<string name="post_filter_usage_user">"ユーザー: %1$s"</string>
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index b1ffdc6a..94580610 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -966,7 +966,7 @@ Bericht: %2$s"</string>
<string name="post_filter_requires_a_name">"Wat is de naam van deze post filter?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' Bestaat Al"</string>
<string name="duplicate_post_filter_dialog_message">"Overschrijven?"</string>
- <string name="apply_post_filter_to">"Toepassen op"</string>
+ <string name="apply_to">"Toepassen op"</string>
<string name="post_filter_usage_home">"Thuis"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 88464efe..c91a3468 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -956,7 +956,7 @@ Wiadomość: %2$s"</string>
<string name="post_filter_requires_a_name">"Jaka jest nazwa filtru tego posta?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' już istnieje"</string>
<string name="duplicate_post_filter_dialog_message">"Nadpisać?"</string>
- <string name="apply_post_filter_to">"Zastosuj do"</string>
+ <string name="apply_to">"Zastosuj do"</string>
<string name="post_filter_usage_home">"Strona główna"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index ce5c902d..91287b62 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -944,7 +944,7 @@ Mensagem: %2$s"</string>
<string name="post_filter_requires_a_name">"Qual é o nome deste filtro de postagem?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' já existe"</string>
<string name="duplicate_post_filter_dialog_message">"Substituir isto?"</string>
- <string name="apply_post_filter_to">"Aplicar a"</string>
+ <string name="apply_to">"Aplicar a"</string>
<string name="post_filter_usage_home">"Início"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index cfebe3c9..b964bc83 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -953,7 +953,7 @@ Mensagem: %2$s"</string>
<string name="post_filter_requires_a_name">"Qual é o nome deste Filtro de Publicações?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' já existe"</string>
<string name="duplicate_post_filter_dialog_message">"Substituir?"</string>
- <string name="apply_post_filter_to">"Aplicar a"</string>
+ <string name="apply_to">"Aplicar a"</string>
<string name="post_filter_usage_home">"Início"</string>
<string name="post_filter_usage_subreddit">"Comunidade: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Comunidade"</string>
diff --git a/app/src/main/res/values-ro/strings.xml b/app/src/main/res/values-ro/strings.xml
index db632014..9b506646 100644
--- a/app/src/main/res/values-ro/strings.xml
+++ b/app/src/main/res/values-ro/strings.xml
@@ -950,7 +950,7 @@ Mesaj: %2$s"</string>
<string name="post_filter_requires_a_name">"Care este numele acestui filtru de post?"</string>
<string name="duplicate_post_filter_dialog_title">"%1$s' Există Deja"</string>
<string name="duplicate_post_filter_dialog_message">"Îl înlocuiești?"</string>
- <string name="apply_post_filter_to">"Se aplică la"</string>
+ <string name="apply_to">"Se aplică la"</string>
<string name="post_filter_usage_home">"Acasă"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 647dc3d8..7297be41 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -966,7 +966,7 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="post_filter_requires_a_name">"Как называется этот фильтр постов?"</string>
<string name="duplicate_post_filter_dialog_title">"«%1$s» уже существует"</string>
<string name="duplicate_post_filter_dialog_message">"Переопределить это?"</string>
- <string name="apply_post_filter_to">"Применить к"</string>
+ <string name="apply_to">"Применить к"</string>
<string name="post_filter_usage_home">"Домашняя"</string>
<string name="post_filter_usage_subreddit">"Сабреддит: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Сабреддит"</string>
diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml
index fefd14b5..ec296f29 100644
--- a/app/src/main/res/values-tr-rTR/strings.xml
+++ b/app/src/main/res/values-tr-rTR/strings.xml
@@ -974,7 +974,7 @@ Mesaj: %2$s"</string>
<string name="post_filter_requires_a_name">"Bu gönderi filtresinin adı nedir?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' Zaten Var"</string>
<string name="duplicate_post_filter_dialog_message">"Geçersiz kılınsın mı?"</string>
- <string name="apply_post_filter_to">"Uygulanan:"</string>
+ <string name="apply_to">"Uygulanan:"</string>
<string name="post_filter_usage_home">"Ana Sayfa"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index c34bc491..bc044225 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -954,7 +954,7 @@ https://play.google.com/store/apps/details?id=ml.docilealligator.infinityforredd
<string name="post_filter_requires_a_name">"Яка назва для цього фільтру дописів?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' вже існує"</string>
<string name="duplicate_post_filter_dialog_message">"Перезаписати його?"</string>
- <string name="apply_post_filter_to">"Задіяно для"</string>
+ <string name="apply_to">"Задіяно для"</string>
<string name="post_filter_usage_home">"Домівка"</string>
<string name="post_filter_usage_subreddit">"Сабредит: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Сабредит"</string>
diff --git a/app/src/main/res/values-vi/strings.xml b/app/src/main/res/values-vi/strings.xml
index c1aa63d7..093a2fc5 100644
--- a/app/src/main/res/values-vi/strings.xml
+++ b/app/src/main/res/values-vi/strings.xml
@@ -967,7 +967,7 @@ Thông báo: %2$s"</string>
<string name="post_filter_requires_a_name">"Bộ lọc bài đăng này tên là gì?"</string>
<string name="duplicate_post_filter_dialog_title">"'%1$s' đã tồn tại"</string>
<string name="duplicate_post_filter_dialog_message">"Ghi đè nó?"</string>
- <string name="apply_post_filter_to">"Áp dụng vào"</string>
+ <string name="apply_to">"Áp dụng vào"</string>
<string name="post_filter_usage_home">"Trang chủ"</string>
<string name="post_filter_usage_subreddit">"Subreddit: %1$s"</string>
<string name="post_filter_usage_subreddit_all">"Subreddit"</string>
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 726fefb6..e58e7b7e 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -981,7 +981,7 @@ Reddit 视频分辨率较低。
<string name="post_filter_requires_a_name">"该帖子过滤器的名称是什么?"</string>
<string name="duplicate_post_filter_dialog_title">"“%1$s”已经存在"</string>
<string name="duplicate_post_filter_dialog_message">"覆盖吗?"</string>
- <string name="apply_post_filter_to">"应用于"</string>
+ <string name="apply_to">"应用于"</string>
<string name="post_filter_usage_home">"主页"</string>
<string name="post_filter_usage_subreddit">"版块:%1$s"</string>
<string name="post_filter_usage_subreddit_all">"版块"</string>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7cab6989..33f35339 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1141,7 +1141,7 @@
<string name="post_filter_requires_a_name">What is the name of this post filter?</string>
<string name="duplicate_post_filter_dialog_title">\'%1$s\' Already Exists</string>
<string name="duplicate_post_filter_dialog_message">Override it?</string>
- <string name="apply_post_filter_to">Apply to</string>
+ <string name="apply_to">Apply to</string>
<string name="post_filter_usage_home">Home</string>
<string name="post_filter_usage_subreddit">Subreddit: %1$s</string>
<string name="post_filter_usage_subreddit_all">Subreddit</string>