From 2ac4a7f8059fdef8bd151e72f294d453d9c163c2 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Thu, 19 Oct 2023 16:12:47 -0400 Subject: Continue adding comment filter. --- app/src/main/AndroidManifest.xml | 1 + .../infinityforreddit/AppComponent.java | 3 + .../CommentFilterPreferenceActivity.java | 2 +- .../CommentFilterUsageListingActivity.java | 173 ++++++++++++++++++++- .../activities/PostFilterUsageListingActivity.java | 8 +- .../CommentFilterUsageRecyclerViewAdapter.java | 82 ++++++++++ ...mmentFilterUsageOptionsBottomSheetFragment.java | 58 +++++++ .../NewCommentFilterUsageBottomSheetFragment.java | 52 +++++++ .../commentfilter/CommentFilterUsageViewModel.java | 40 +++++ .../commentfilter/DeleteCommentFilterUsage.java | 12 ++ .../commentfilter/SaveCommentFilterUsage.java | 12 ++ .../activity_comment_filter_usage_listing.xml | 49 +++++- .../dialog_edit_post_filter_name_of_usage.xml | 38 ----- ...g_edit_post_or_comment_filter_name_of_usage.xml | 39 +++++ ...t_comment_filter_usage_options_bottom_sheet.xml | 52 +++++++ ...gment_new_comment_filter_usage_bottom_sheet.xml | 52 +++++++ app/src/main/res/values/strings.xml | 9 +- 17 files changed, 626 insertions(+), 56 deletions(-) create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageRecyclerViewAdapter.java create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterUsageOptionsBottomSheetFragment.java create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/NewCommentFilterUsageBottomSheetFragment.java create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterUsageViewModel.java create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilterUsage.java create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/SaveCommentFilterUsage.java delete mode 100644 app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml create mode 100644 app/src/main/res/layout/dialog_edit_post_or_comment_filter_name_of_usage.xml create mode 100644 app/src/main/res/layout/fragment_comment_filter_usage_options_bottom_sheet.xml create mode 100644 app/src/main/res/layout/fragment_new_comment_filter_usage_bottom_sheet.xml (limited to 'app') diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a72dd210..8a67b013 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -38,6 +38,7 @@ { + NewCommentFilterUsageBottomSheetFragment newCommentFilterUsageBottomSheetFragment = new NewCommentFilterUsageBottomSheetFragment(); + newCommentFilterUsageBottomSheetFragment.show(getSupportFragmentManager(), newCommentFilterUsageBottomSheetFragment.getTag()); + }); + + adapter = new CommentFilterUsageRecyclerViewAdapter(this, customThemeWrapper, commentFilterUsage -> { + CommentFilterUsageOptionsBottomSheetFragment commentFilterUsageOptionsBottomSheetFragment = new CommentFilterUsageOptionsBottomSheetFragment(); + Bundle bundle = new Bundle(); + bundle.putParcelable(CommentFilterUsageOptionsBottomSheetFragment.EXTRA_COMMENT_FILTER_USAGE, commentFilterUsage); + commentFilterUsageOptionsBottomSheetFragment.setArguments(bundle); + commentFilterUsageOptionsBottomSheetFragment.show(getSupportFragmentManager(), commentFilterUsageOptionsBottomSheetFragment.getTag()); + }); + binding.recyclerViewCommentFilterUsageListingActivity.setAdapter(adapter); + + commentFilterUsageViewModel = new ViewModelProvider(this, + new CommentFilterUsageViewModel.Factory(redditDataRoomDatabase, commentFilter.name)).get(CommentFilterUsageViewModel.class); + + commentFilterUsageViewModel.getCommentFilterUsageListLiveData().observe(this, commentFilterUsages -> adapter.setCommentFilterUsages(commentFilterUsages)); + } + + public void newCommentFilterUsage(int type) { + switch (type) { + case CommentFilterUsage.SUBREDDIT_TYPE: + case CommentFilterUsage.USER_TYPE: + editAndCommentFilterUsageNameOfUsage(type, null); + break; + } + } + + private void editAndCommentFilterUsageNameOfUsage(int type, String nameOfUsage) { + View dialogView = getLayoutInflater().inflate(R.layout.dialog_edit_post_or_comment_filter_name_of_usage, null); + TextView messageTextView = dialogView.findViewById(R.id.message_text_view_edit_post_or_comment_filter_name_of_usage_dialog); + messageTextView.setVisibility(View.GONE); + TextInputLayout textInputLayout = dialogView.findViewById(R.id.text_input_layout_edit_post_or_comment_filter_name_of_usage_dialog); + TextInputEditText textInputEditText = dialogView.findViewById(R.id.text_input_edit_text_edit_post_or_comment_filter_name_of_usage_dialog); + int primaryTextColor = customThemeWrapper.getPrimaryTextColor(); + textInputLayout.setBoxStrokeColor(primaryTextColor); + textInputLayout.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor)); + textInputEditText.setTextColor(primaryTextColor); + if (nameOfUsage != null) { + textInputEditText.setText(nameOfUsage); + } + textInputEditText.requestFocus(); + int titleStringId = R.string.subreddit; + switch (type) { + case CommentFilterUsage.SUBREDDIT_TYPE: + textInputEditText.setHint(R.string.settings_tab_subreddit_name); + break; + case CommentFilterUsage.USER_TYPE: + textInputEditText.setHint(R.string.settings_tab_username); + titleStringId = R.string.user; + break; + } + + Utils.showKeyboard(this, new Handler(), textInputEditText); + new MaterialAlertDialogBuilder(this, R.style.MaterialAlertDialogTheme) + .setTitle(titleStringId) + .setView(dialogView) + .setPositiveButton(R.string.ok, (editTextDialogInterface, i1) + -> { + Utils.hideKeyboard(this); + + CommentFilterUsage commentFilterUsage; + if (!textInputEditText.getText().toString().equals("")) { + commentFilterUsage = new CommentFilterUsage(commentFilter.name, type, textInputEditText.getText().toString()); + SaveCommentFilterUsage.saveCommentFilterUsage(redditDataRoomDatabase, executor, commentFilterUsage); + } + }) + .setNegativeButton(R.string.cancel, null) + .setOnDismissListener(editTextDialogInterface -> { + Utils.hideKeyboard(this); + }) + .show(); + } + + public void editCommentFilterUsage(CommentFilterUsage commentFilterUsage) { + editAndCommentFilterUsageNameOfUsage(commentFilterUsage.usage, commentFilterUsage.nameOfUsage); + } + + public void deleteCommentFilterUsage(CommentFilterUsage commentFilterUsage) { + DeleteCommentFilterUsage.deleteCommentFilterUsage(redditDataRoomDatabase, executor, commentFilterUsage); + } + + @Override + public boolean onOptionsItemSelected(@NonNull MenuItem item) { + if (item.getItemId() == android.R.id.home) { + finish(); + return true; + } + + return false; + } + + @Override + protected SharedPreferences getDefaultSharedPreferences() { + return sharedPreferences; + } + + @Override + protected CustomThemeWrapper getCustomThemeWrapper() { + return customThemeWrapper; + } + + @Override + protected void applyCustomTheme() { + applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(binding.appbarLayoutCommentFilterUsageListingActivity, binding.collapsingToolbarLayoutCommentFilterUsageListingActivity, binding.toolbarCommentFilterUsageListingActivity); + applyFABTheme(binding.fabCommentFilterUsageListingActivity); + binding.getRoot().setBackgroundColor(customThemeWrapper.getBackgroundColor()); } } \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostFilterUsageListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostFilterUsageListingActivity.java index f92bf933..bb3265fa 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostFilterUsageListingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostFilterUsageListingActivity.java @@ -1,13 +1,11 @@ package ml.docilealligator.infinityforreddit.activities; -import android.content.Context; import android.content.SharedPreferences; import android.content.res.ColorStateList; import android.os.Bundle; import android.os.Handler; import android.view.MenuItem; import android.view.View; -import android.view.inputmethod.InputMethodManager; import androidx.annotation.NonNull; import androidx.appcompat.widget.Toolbar; @@ -127,9 +125,9 @@ public class PostFilterUsageListingActivity extends BaseActivity { } private void editAndPostFilterUsageNameOfUsage(int type, String nameOfUsage) { - View dialogView = getLayoutInflater().inflate(R.layout.dialog_edit_post_filter_name_of_usage, null); - TextInputLayout textInputLayout = dialogView.findViewById(R.id.text_input_layout_edit_post_filter_name_of_usage_dialog); - TextInputEditText textInputEditText = dialogView.findViewById(R.id.text_input_edit_text_edit_post_filter_name_of_usage_dialog); + View dialogView = getLayoutInflater().inflate(R.layout.dialog_edit_post_or_comment_filter_name_of_usage, null); + TextInputLayout textInputLayout = dialogView.findViewById(R.id.text_input_layout_edit_post_or_comment_filter_name_of_usage_dialog); + TextInputEditText textInputEditText = dialogView.findViewById(R.id.text_input_edit_text_edit_post_or_comment_filter_name_of_usage_dialog); int primaryTextColor = customThemeWrapper.getPrimaryTextColor(); textInputLayout.setBoxStrokeColor(primaryTextColor); textInputLayout.setDefaultHintTextColor(ColorStateList.valueOf(primaryTextColor)); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageRecyclerViewAdapter.java new file mode 100644 index 00000000..a6f510fd --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentFilterUsageRecyclerViewAdapter.java @@ -0,0 +1,82 @@ +package ml.docilealligator.infinityforreddit.adapters; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +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.customtheme.CustomThemeWrapper; + +public class CommentFilterUsageRecyclerViewAdapter extends RecyclerView.Adapter { + private List commentFilterUsages; + private BaseActivity activity; + private CustomThemeWrapper customThemeWrapper; + private CommentFilterUsageRecyclerViewAdapter.OnItemClickListener onItemClickListener; + + public interface OnItemClickListener { + void onClick(CommentFilterUsage commentFilterUsage); + } + + public CommentFilterUsageRecyclerViewAdapter(BaseActivity activity, CustomThemeWrapper customThemeWrapper, + CommentFilterUsageRecyclerViewAdapter.OnItemClickListener onItemClickListener) { + this.activity = activity; + this.customThemeWrapper = customThemeWrapper; + this.onItemClickListener = onItemClickListener; + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + return new CommentFilterUsageRecyclerViewAdapter.CommentFilterUsageViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_post_filter_usage, parent, false)); + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + CommentFilterUsage commentFilterUsage = commentFilterUsages.get(position); + switch (commentFilterUsage.usage) { + case CommentFilterUsage.SUBREDDIT_TYPE: + ((CommentFilterUsageRecyclerViewAdapter.CommentFilterUsageViewHolder) holder).usageTextView.setText(activity.getString(R.string.post_filter_usage_subreddit, commentFilterUsage.nameOfUsage)); + break; + case CommentFilterUsage.USER_TYPE: + ((CommentFilterUsageRecyclerViewAdapter.CommentFilterUsageViewHolder) holder).usageTextView.setText(activity.getString(R.string.post_filter_usage_user, commentFilterUsage.nameOfUsage)); + break; + } + } + + @Override + public int getItemCount() { + return commentFilterUsages == null ? 0 : commentFilterUsages.size(); + } + + public void setCommentFilterUsages(List commentFilterUsages) { + this.commentFilterUsages = commentFilterUsages; + notifyDataSetChanged(); + } + + private class CommentFilterUsageViewHolder extends RecyclerView.ViewHolder { + TextView usageTextView; + + public CommentFilterUsageViewHolder(@NonNull View itemView) { + super(itemView); + usageTextView = (TextView) itemView; + + usageTextView.setTextColor(customThemeWrapper.getPrimaryTextColor()); + + if (activity.typeface != null) { + usageTextView.setTypeface(activity.typeface); + } + + usageTextView.setOnClickListener(view -> { + onItemClickListener.onClick(commentFilterUsages.get(getBindingAdapterPosition())); + }); + } + } +} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterUsageOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterUsageOptionsBottomSheetFragment.java new file mode 100644 index 00000000..988dfdad --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentFilterUsageOptionsBottomSheetFragment.java @@ -0,0 +1,58 @@ +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 ml.docilealligator.infinityforreddit.activities.CommentFilterUsageListingActivity; +import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterUsage; +import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment; +import ml.docilealligator.infinityforreddit.databinding.FragmentCommentFilterUsageOptionsBottomSheetBinding; +import ml.docilealligator.infinityforreddit.utils.Utils; + +public class CommentFilterUsageOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment { + + public static final String EXTRA_COMMENT_FILTER_USAGE = "ECFU"; + + private CommentFilterUsageListingActivity activity; + + public CommentFilterUsageOptionsBottomSheetFragment() { + // Required empty public constructor + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + FragmentCommentFilterUsageOptionsBottomSheetBinding binding = FragmentCommentFilterUsageOptionsBottomSheetBinding.inflate(inflater, container, false); + + CommentFilterUsage commentFilterUsage = getArguments().getParcelable(EXTRA_COMMENT_FILTER_USAGE); + + binding.editTextViewCommentFilterUsageOptionsBottomSheetFragment.setOnClickListener(view -> { + activity.editCommentFilterUsage(commentFilterUsage); + dismiss(); + }); + + binding.deleteTextViewCommentFilterUsageOptionsBottomSheetFragment.setOnClickListener(view -> { + activity.deleteCommentFilterUsage(commentFilterUsage); + 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 = (CommentFilterUsageListingActivity) context; + } +} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/NewCommentFilterUsageBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/NewCommentFilterUsageBottomSheetFragment.java new file mode 100644 index 00000000..2ff59d2b --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/NewCommentFilterUsageBottomSheetFragment.java @@ -0,0 +1,52 @@ +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 ml.docilealligator.infinityforreddit.activities.CommentFilterUsageListingActivity; +import ml.docilealligator.infinityforreddit.commentfilter.CommentFilterUsage; +import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment; +import ml.docilealligator.infinityforreddit.databinding.FragmentNewCommentFilterUsageBottomSheetBinding; +import ml.docilealligator.infinityforreddit.utils.Utils; + +public class NewCommentFilterUsageBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment { + private CommentFilterUsageListingActivity activity; + + public NewCommentFilterUsageBottomSheetFragment() { + // Required empty public constructor + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + FragmentNewCommentFilterUsageBottomSheetBinding binding = FragmentNewCommentFilterUsageBottomSheetBinding.inflate(inflater, container, false); + + binding.subredditTextViewNewCommentFilterUsageBottomSheetFragment.setOnClickListener(view -> { + activity.newCommentFilterUsage(CommentFilterUsage.SUBREDDIT_TYPE); + dismiss(); + }); + + binding.userTextViewNewCommentFilterUsageBottomSheetFragment.setOnClickListener(view -> { + activity.newCommentFilterUsage(CommentFilterUsage.USER_TYPE); + 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 = (CommentFilterUsageListingActivity) context; + } +} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterUsageViewModel.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterUsageViewModel.java new file mode 100644 index 00000000..89a03f41 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/CommentFilterUsageViewModel.java @@ -0,0 +1,40 @@ +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 CommentFilterUsageViewModel extends ViewModel { + private LiveData> mCommentFilterUsageListLiveData; + + public CommentFilterUsageViewModel(RedditDataRoomDatabase redditDataRoomDatabase, String name) { + mCommentFilterUsageListLiveData = redditDataRoomDatabase.commentFilterUsageDao().getAllCommentFilterUsageLiveData(name); + } + + public LiveData> getCommentFilterUsageListLiveData() { + return mCommentFilterUsageListLiveData; + } + + public static class Factory extends ViewModelProvider.NewInstanceFactory { + + private final RedditDataRoomDatabase mRedditDataRoomDatabase; + private final String mName; + + public Factory(RedditDataRoomDatabase redditDataRoomDatabase, String name) { + mRedditDataRoomDatabase = redditDataRoomDatabase; + mName = name; + } + + @NonNull + @Override + public T create(@NonNull Class modelClass) { + //noinspection unchecked + return (T) new CommentFilterUsageViewModel(mRedditDataRoomDatabase, mName); + } + } +} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilterUsage.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilterUsage.java new file mode 100644 index 00000000..69051515 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/DeleteCommentFilterUsage.java @@ -0,0 +1,12 @@ +package ml.docilealligator.infinityforreddit.commentfilter; + +import java.util.concurrent.Executor; + +import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; + +public class DeleteCommentFilterUsage { + public static void deleteCommentFilterUsage(RedditDataRoomDatabase redditDataRoomDatabase, Executor executor, + CommentFilterUsage commentFilterUsage) { + executor.execute(() -> redditDataRoomDatabase.commentFilterUsageDao().deleteCommentFilterUsage(commentFilterUsage)); + } +} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/SaveCommentFilterUsage.java b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/SaveCommentFilterUsage.java new file mode 100644 index 00000000..8060d9c0 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/commentfilter/SaveCommentFilterUsage.java @@ -0,0 +1,12 @@ +package ml.docilealligator.infinityforreddit.commentfilter; + +import java.util.concurrent.Executor; + +import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; + +public class SaveCommentFilterUsage { + public static void saveCommentFilterUsage(RedditDataRoomDatabase redditDataRoomDatabase, Executor executor, + CommentFilterUsage commentFilterUsage) { + executor.execute(() -> redditDataRoomDatabase.commentFilterUsageDao().insert(commentFilterUsage)); + } +} 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 index 6b268520..75cfc4e3 100644 --- a/app/src/main/res/layout/activity_comment_filter_usage_listing.xml +++ b/app/src/main/res/layout/activity_comment_filter_usage_listing.xml @@ -1,9 +1,52 @@ - + tools:context=".activities.PostFilterUsageListingActivity"> - \ No newline at end of file + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml b/app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml deleted file mode 100644 index 48ee48f1..00000000 --- a/app/src/main/res/layout/dialog_edit_post_filter_name_of_usage.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_edit_post_or_comment_filter_name_of_usage.xml b/app/src/main/res/layout/dialog_edit_post_or_comment_filter_name_of_usage.xml new file mode 100644 index 00000000..df776bae --- /dev/null +++ b/app/src/main/res/layout/dialog_edit_post_or_comment_filter_name_of_usage.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_comment_filter_usage_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_comment_filter_usage_options_bottom_sheet.xml new file mode 100644 index 00000000..cc9e4926 --- /dev/null +++ b/app/src/main/res/layout/fragment_comment_filter_usage_options_bottom_sheet.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_new_comment_filter_usage_bottom_sheet.xml b/app/src/main/res/layout/fragment_new_comment_filter_usage_bottom_sheet.xml new file mode 100644 index 00000000..2cd5e545 --- /dev/null +++ b/app/src/main/res/layout/fragment_new_comment_filter_usage_bottom_sheet.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9090da33..6f97b59f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1159,11 +1159,15 @@ Subreddit User Leave it blank to apply this post filter to all the subreddits / users / multireddits + Click here to apply it to some post feeds + and %1$d more Comment Filter Name What is the name of this comment filter? \'%1$s\' Already Exists Override it? + Applied to all subreddits + and %1$d more You are doing this too frequently. Try again later. This is Reddit API\'s rate limit. Read all messages successfully @@ -1383,9 +1387,4 @@ Otherwise, Infinity may not load posts at all. Sorry for the inconvenience. I understand - Click here to apply it to some post feeds - and %1$d more - Applied to all subreddits - and %1$d more - -- cgit v1.2.3