From 6a8f27f9476db4328b1a00595c9e09c5a83ffb22 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 23 Dec 2020 17:03:41 +0800 Subject: Add a new option category: Post Filter. Marking posts as read is disabled by default. Marking posts as read after voting is now available. --- app/build.gradle | 2 + .../infinityforreddit/AppComponent.java | 3 + .../infinityforreddit/AppModule.java | 6 ++ .../activities/SettingsActivity.java | 3 + .../adapters/PostRecyclerViewAdapter.java | 22 +++++ .../infinityforreddit/fragments/PostFragment.java | 50 +++++++---- .../infinityforreddit/readpost/InsertReadPost.java | 4 +- .../settings/PostHistoryFragment.java | 98 ++++++++++++++++++++++ .../utils/SharedPreferencesUtils.java | 4 + .../main/res/drawable-night/ic_history_24dp.xml | 9 ++ app/src/main/res/layout/fragment_post_history.xml | 93 ++++++++++++++++++++ app/src/main/res/values/strings.xml | 5 +- app/src/main/res/xml/main_preferences.xml | 5 ++ app/src/main/res/xml/miscellaneous_preferences.xml | 2 +- app/src/main/res/xml/post_history.xml | 4 + 15 files changed, 290 insertions(+), 20 deletions(-) create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java create mode 100644 app/src/main/res/drawable-night/ic_history_24dp.xml create mode 100644 app/src/main/res/layout/fragment_post_history.xml create mode 100644 app/src/main/res/xml/post_history.xml diff --git a/app/build.gradle b/app/build.gradle index 3e040afa..4b24f2d0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -98,6 +98,8 @@ dependencies { implementation 'androidx.biometric:biometric:1.1.0-rc01' implementation 'com.airbnb.android:lottie:3.4.4' implementation 'com.melegy.redscreenofdeath:red-screen-of-death:0.1.2' + // debugImplementation because LeakCanary should only run in debug builds. + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.5' def toroVersion = '3.7.0.2010003' implementation "im.ene.toro3:toro:$toroVersion" diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java index dc7be5e3..2f881530 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java @@ -73,6 +73,7 @@ import ml.docilealligator.infinityforreddit.settings.MainPreferenceFragment; import ml.docilealligator.infinityforreddit.settings.MiscellaneousPreferenceFragment; import ml.docilealligator.infinityforreddit.settings.NotificationPreferenceFragment; import ml.docilealligator.infinityforreddit.settings.NsfwAndBlurringFragment; +import ml.docilealligator.infinityforreddit.settings.PostHistoryFragment; import ml.docilealligator.infinityforreddit.settings.SecurityPreferenceFragment; import ml.docilealligator.infinityforreddit.settings.ThemePreferenceFragment; import ml.docilealligator.infinityforreddit.settings.TranslationFragment; @@ -230,4 +231,6 @@ public interface AppComponent { void inject(SubredditFilterPopularAndAllActivity subredditFilterPopularAndAllActivity); void inject(CustomizePostFilterActivity customizePostFilterActivity); + + void inject(PostHistoryFragment postHistoryFragment); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AppModule.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AppModule.java index 8e483803..38d971a5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AppModule.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AppModule.java @@ -222,6 +222,12 @@ class AppModule { return mApplication.getSharedPreferences(SharedPreferencesUtils.BOTTOM_APP_BAR_SHARED_PREFERENCES_FILE, Context.MODE_PRIVATE); } + @Provides + @Named("post_history") + SharedPreferences providePostHistorySharedPreferences() { + return mApplication.getSharedPreferences(SharedPreferencesUtils.POST_HISTORY_SHARED_PREFERENCES_FILE, Context.MODE_PRIVATE); + } + @Provides @Singleton CustomThemeWrapper provideCustomThemeWrapper(@Named("light_theme") SharedPreferences lightThemeSharedPreferences, diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SettingsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SettingsActivity.java index f9c8c39e..699946a5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SettingsActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SettingsActivity.java @@ -35,6 +35,7 @@ import ml.docilealligator.infinityforreddit.settings.GesturesAndButtonsPreferenc import ml.docilealligator.infinityforreddit.settings.InterfacePreferenceFragment; import ml.docilealligator.infinityforreddit.settings.MainPreferenceFragment; import ml.docilealligator.infinityforreddit.settings.NsfwAndBlurringFragment; +import ml.docilealligator.infinityforreddit.settings.PostHistoryFragment; public class SettingsActivity extends BaseActivity implements PreferenceFragmentCompat.OnPreferenceStartFragmentCallback { @@ -168,6 +169,8 @@ public class SettingsActivity extends BaseActivity implements args.putString(NsfwAndBlurringFragment.EXTRA_ACCOUNT_NAME, mAccountName); } else if (fragment instanceof CustomizeBottomAppBarFragment) { args.putString(CustomizeBottomAppBarFragment.EXTRA_ACCOUNT_NAME, mAccountName); + } else if (fragment instanceof PostHistoryFragment) { + args.putString(PostHistoryFragment.EXTRA_ACCOUNT_NAME, mAccountName); } fragment.setArguments(args); fragment.setTargetFragment(caller, 0); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 819874b7..defbb0a5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -194,6 +194,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter subredditFilterList; private ArrayList readPosts; + private Unbinder unbinder; public PostFragment() { // Required empty public constructor @@ -275,7 +280,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { ((Infinity) activity.getApplication()).getAppComponent().inject(this); - ButterKnife.bind(this, rootView); + unbinder = ButterKnife.bind(this, rootView); EventBus.getDefault().register(this); @@ -469,7 +474,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { mAdapter = new PostRecyclerViewAdapter(activity, mOauthRetrofit, mRetrofit, mGfycatRetrofit, mRedgifsRetrofit, mRedditDataRoomDatabase, customThemeWrapper, locale, windowWidth, accessToken, accountName, postType, postLayout, true, - mSharedPreferences, mNsfwAndSpoilerSharedPreferences, exoCreator, new PostRecyclerViewAdapter.Callback() { + mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, + exoCreator, new PostRecyclerViewAdapter.Callback() { @Override public void retryLoadingMore() { mPostViewModel.retryLoadingMore(); @@ -513,13 +519,13 @@ public class PostFragment extends Fragment implements FragmentCommunicator { String sortTime = null; sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_SUBREDDIT_POST_BASE + subredditName, SortType.Type.HOT.name()); - if(sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { + if (sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_SUBREDDIT_POST_BASE + subredditName, SortType.Time.ALL.name()); } boolean displaySubredditName = subredditName != null && (subredditName.equals("popular") || subredditName.equals("all")); postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_SUBREDDIT_POST_BASE + subredditName, defaultPostLayout); - if(sortTime != null) { + if (sortTime != null) { sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime)); } else { sortType = new SortType(SortType.Type.valueOf(sort)); @@ -528,7 +534,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { mAdapter = new PostRecyclerViewAdapter(activity, mOauthRetrofit, mRetrofit, mGfycatRetrofit, mRedgifsRetrofit, mRedditDataRoomDatabase, customThemeWrapper, locale, windowWidth, accessToken, accountName, postType, postLayout, displaySubredditName, - mSharedPreferences, mNsfwAndSpoilerSharedPreferences, exoCreator, new PostRecyclerViewAdapter.Callback() { + mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, + exoCreator, new PostRecyclerViewAdapter.Callback() { @Override public void retryLoadingMore() { mPostViewModel.retryLoadingMore(); @@ -564,21 +571,21 @@ public class PostFragment extends Fragment implements FragmentCommunicator { TransitionManager.beginDelayedTransition(mPostRecyclerView, new AutoTransition()); } }); - } else if(postType == PostDataSource.TYPE_MULTI_REDDIT) { + } else if (postType == PostDataSource.TYPE_MULTI_REDDIT) { multiRedditPath = getArguments().getString(EXTRA_NAME); String sort; String sortTime = null; sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_MULTI_REDDIT_POST_BASE + multiRedditPath, SortType.Type.HOT.name()); - if(sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { + if (sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_MULTI_REDDIT_POST_BASE + multiRedditPath, SortType.Time.ALL.name()); } postLayout = mPostLayoutSharedPreferences.getInt(SharedPreferencesUtils.POST_LAYOUT_MULTI_REDDIT_POST_BASE + multiRedditPath, defaultPostLayout); - if(sortTime != null) { + if (sortTime != null) { sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime)); } else { sortType = new SortType(SortType.Type.valueOf(sort)); @@ -587,7 +594,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { mAdapter = new PostRecyclerViewAdapter(activity, mOauthRetrofit, mRetrofit, mGfycatRetrofit, mRedgifsRetrofit, mRedditDataRoomDatabase, customThemeWrapper, locale, windowWidth, accessToken, accountName, postType, postLayout, true, - mSharedPreferences, mNsfwAndSpoilerSharedPreferences, exoCreator, new PostRecyclerViewAdapter.Callback() { + mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, + exoCreator, new PostRecyclerViewAdapter.Callback() { @Override public void retryLoadingMore() { mPostViewModel.retryLoadingMore(); @@ -633,7 +641,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_USER_POST_BASE + username, SortType.Type.NEW.name()); - if(sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { + if (sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { String sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_USER_POST_BASE + username, SortType.Time.ALL.name()); sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime)); } else { @@ -644,7 +652,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { mAdapter = new PostRecyclerViewAdapter(activity, mOauthRetrofit, mRetrofit, mGfycatRetrofit, mRedgifsRetrofit, mRedditDataRoomDatabase, customThemeWrapper, locale, windowWidth, accessToken, accountName, postType, postLayout, true, - mSharedPreferences, mNsfwAndSpoilerSharedPreferences, exoCreator, new PostRecyclerViewAdapter.Callback() { + mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, + exoCreator, new PostRecyclerViewAdapter.Callback() { @Override public void retryLoadingMore() { mPostViewModel.retryLoadingMore(); @@ -684,7 +693,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { }); } else { String sort = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TYPE_BEST_POST, SortType.Type.BEST.name()); - if(sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { + if (sort.equals(SortType.Type.CONTROVERSIAL.name()) || sort.equals(SortType.Type.TOP.name())) { String sortTime = mSortTypeSharedPreferences.getString(SharedPreferencesUtils.SORT_TIME_BEST_POST, SortType.Time.ALL.name()); sortType = new SortType(SortType.Type.valueOf(sort), SortType.Time.valueOf(sortTime)); } else { @@ -695,7 +704,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { mAdapter = new PostRecyclerViewAdapter(activity, mOauthRetrofit, mRetrofit, mGfycatRetrofit, mRedgifsRetrofit, mRedditDataRoomDatabase, customThemeWrapper, locale, windowWidth, accessToken, accountName, postType, postLayout, true, - mSharedPreferences, mNsfwAndSpoilerSharedPreferences, exoCreator, new PostRecyclerViewAdapter.Callback() { + mSharedPreferences, mNsfwAndSpoilerSharedPreferences, mPostHistorySharedPreferences, + exoCreator, new PostRecyclerViewAdapter.Callback() { @Override public void retryLoadingMore() { mPostViewModel.retryLoadingMore(); @@ -740,7 +750,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } if (accountName != null && !accountName.equals("")) { - if (readPosts == null) { + if (mPostHistorySharedPreferences.getBoolean((accountName == null ? "" : accountName) + SharedPreferencesUtils.MARK_POSTS_AS_READ_BASE, false) && readPosts == null) { if (getArguments().getBoolean(EXTRA_DISABLE_READ_POSTS, false)) { initializeAndBindPostViewModel(accessToken); } else { @@ -1011,13 +1021,13 @@ public class PostFragment extends Fragment implements FragmentCommunicator { break; case PostDataSource.TYPE_USER: mSortTypeSharedPreferences.edit().putString(SharedPreferencesUtils.SORT_TYPE_USER_POST_BASE + username, sortType.getType().name()).apply(); - if(sortType.getTime() != null) { + if (sortType.getTime() != null) { mSortTypeSharedPreferences.edit().putString(SharedPreferencesUtils.SORT_TIME_USER_POST_BASE + username, sortType.getTime().name()).apply(); } break; case PostDataSource.TYPE_SEARCH: mSortTypeSharedPreferences.edit().putString(SharedPreferencesUtils.SORT_TYPE_SEARCH_POST, sortType.getType().name()).apply(); - if(sortType.getTime() != null) { + if (sortType.getTime() != null) { mSortTypeSharedPreferences.edit().putString(SharedPreferencesUtils.SORT_TIME_SEARCH_POST, sortType.getTime().name()).apply(); } break; @@ -1279,7 +1289,7 @@ public class PostFragment extends Fragment implements FragmentCommunicator { intent.putExtra(FilteredPostsActivity.EXTRA_NAME, subredditName); intent.putExtra(FilteredPostsActivity.EXTRA_POST_TYPE, postType); startActivity(intent); - } else if(postType == PostDataSource.TYPE_MULTI_REDDIT) { + } else if (postType == PostDataSource.TYPE_MULTI_REDDIT) { Intent intent = new Intent(activity, FilteredPostsActivity.class); intent.putExtra(FilteredPostsActivity.EXTRA_NAME, multiRedditPath); intent.putExtra(FilteredPostsActivity.EXTRA_POST_TYPE, postType); @@ -1616,6 +1626,12 @@ public class PostFragment extends Fragment implements FragmentCommunicator { } } + @Override + public void onDestroyView() { + super.onDestroyView(); + unbinder.unbind(); + } + @Override public void onDestroy() { EventBus.getDefault().unregister(this); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/InsertReadPost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/InsertReadPost.java index b5d34c6f..60ddffe2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/InsertReadPost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/readpost/InsertReadPost.java @@ -27,7 +27,9 @@ public class InsertReadPost { if (readPostDao.getReadPostsCount() > 500) { readPostDao.deleteOldestReadPosts(username); } - readPostDao.insert(new ReadPost(username, postId)); + if (username != null && !username.equals("")) { + readPostDao.insert(new ReadPost(username, postId)); + } return null; } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java new file mode 100644 index 00000000..eebfe17f --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java @@ -0,0 +1,98 @@ +package ml.docilealligator.infinityforreddit.settings; + +import android.app.Activity; +import android.content.Context; +import android.content.SharedPreferences; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.LinearLayout; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatActivity; +import androidx.fragment.app.Fragment; + +import com.google.android.material.switchmaterial.SwitchMaterial; + +import javax.inject.Inject; +import javax.inject.Named; + +import butterknife.BindView; +import butterknife.ButterKnife; +import ml.docilealligator.infinityforreddit.Infinity; +import ml.docilealligator.infinityforreddit.R; +import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; + +public class PostHistoryFragment extends Fragment { + + public static final String EXTRA_ACCOUNT_NAME = "EAN"; + + @BindView(R.id.info_text_view_post_history_fragment) + TextView infoTextView; + @BindView(R.id.mark_posts_as_read_linear_layout_post_history_fragment) + LinearLayout markPostsAsReadLinearLayout; + @BindView(R.id.mark_posts_as_read_switch_post_history_fragment) + SwitchMaterial markPostsAsReadSwitch; + @BindView(R.id.mark_posts_as_read_after_voting_linear_layout_post_history_fragment) + LinearLayout markPostsAsReadAfterVotingLinearLayout; + @BindView(R.id.mark_posts_as_read_after_voting_switch_post_history_fragment) + SwitchMaterial markPostsAsReadAfterVotingSwitch; + @Inject + @Named("post_history") + SharedPreferences postHistorySharedPreferences; + private Activity activity; + + public PostHistoryFragment() { + // Required empty public constructor + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + View rootView = inflater.inflate(R.layout.fragment_post_history, container, false); + + ((Infinity) activity.getApplication()).getAppComponent().inject(this); + + ButterKnife.bind(this, rootView); + + String accountName = getArguments().getString(EXTRA_ACCOUNT_NAME); + if (accountName == null) { + infoTextView.setText(R.string.only_for_logged_in_user); + markPostsAsReadLinearLayout.setVisibility(View.GONE); + markPostsAsReadAfterVotingLinearLayout.setVisibility(View.GONE); + return rootView; + } + + markPostsAsReadSwitch.setChecked(postHistorySharedPreferences.getBoolean( + (accountName == null ? "" : accountName) + SharedPreferencesUtils.MARK_POSTS_AS_READ_BASE, false)); + markPostsAsReadAfterVotingSwitch.setChecked(postHistorySharedPreferences.getBoolean( + (accountName == null ? "" : accountName) + SharedPreferencesUtils.MARK_POSTS_AS_READ_AFTER_VOTING_BASE, false)); + + markPostsAsReadLinearLayout.setOnClickListener(view -> { + markPostsAsReadSwitch.performClick(); + }); + + markPostsAsReadSwitch.setOnCheckedChangeListener((compoundButton, b) -> + postHistorySharedPreferences.edit().putBoolean((accountName == null ? "" : accountName) + + SharedPreferencesUtils.MARK_POSTS_AS_READ_BASE, b).apply()); + + markPostsAsReadAfterVotingLinearLayout.setOnClickListener(view -> { + markPostsAsReadAfterVotingSwitch.performClick(); + }); + + markPostsAsReadAfterVotingSwitch.setOnCheckedChangeListener((compoundButton, b) -> + postHistorySharedPreferences.edit().putBoolean((accountName == null ? "" : accountName) + + SharedPreferencesUtils.MARK_POSTS_AS_READ_AFTER_VOTING_BASE, b).apply()); + + return rootView; + } + + @Override + public void onAttach(@NonNull Context context) { + super.onAttach(context); + this.activity = (AppCompatActivity) context; + } +} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java index 5751af30..72d85aa6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java @@ -218,6 +218,10 @@ public class SharedPreferencesUtils { public static final String BLUR_NSFW_BASE = "_blur_nsfw"; public static final String BLUR_SPOILER_BASE = "_blur_spoiler"; + public static final String POST_HISTORY_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.post_history"; + public static final String MARK_POSTS_AS_READ_BASE = "_mark_posts_as_read"; + public static final String MARK_POSTS_AS_READ_AFTER_VOTING_BASE = "_mark_posts_as_read_after_voting"; + //Legacy Settings public static final String MAIN_PAGE_TAB_1_TITLE_LEGACY = "main_page_tab_1_title"; public static final String MAIN_PAGE_TAB_2_TITLE_LEGACY = "main_page_tab_2_title"; diff --git a/app/src/main/res/drawable-night/ic_history_24dp.xml b/app/src/main/res/drawable-night/ic_history_24dp.xml new file mode 100644 index 00000000..af91e161 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_history_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/fragment_post_history.xml b/app/src/main/res/layout/fragment_post_history.xml new file mode 100644 index 00000000..7eb07801 --- /dev/null +++ b/app/src/main/res/layout/fragment_post_history.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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 0843d94e..ea62ed9c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -513,7 +513,10 @@ Swipe Right Not applicable to post feed with more than 1 column or post detail. Language - Enable Search History + Enable Search History + Post History + Mark Posts As Read + Mark Posts As Read After Voting Cannot get the link diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index 666bc186..334ebd1a 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -57,6 +57,11 @@ app:title="@string/settings_nsfw_and_spoiler_title" app:fragment="ml.docilealligator.infinityforreddit.settings.NsfwAndBlurringFragment"/> + + + + + \ No newline at end of file -- cgit v1.2.3