diff --git a/app/src/main/java/me/ccrama/redditslide/Fragments/SettingsHistoryFragment.java b/app/src/main/java/me/ccrama/redditslide/Fragments/SettingsHistoryFragment.java
index a8beb22566..e2e18be8d3 100644
--- a/app/src/main/java/me/ccrama/redditslide/Fragments/SettingsHistoryFragment.java
+++ b/app/src/main/java/me/ccrama/redditslide/Fragments/SettingsHistoryFragment.java
@@ -33,6 +33,7 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if (isChecked) {
context.findViewById(R.id.settings_history_scrollseen).setEnabled(true);
+ context.findViewById(R.id.settings_history_scrollseenhide).setEnabled(true);
context.findViewById(R.id.settings_history_storensfw).setEnabled(true);
} else {
((SwitchCompat) context.findViewById(R.id.settings_history_storensfw)).setChecked(false);
@@ -44,6 +45,11 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
((SwitchCompat) context.findViewById(R.id.settings_history_scrollseen)).setEnabled(false);
SettingValues.scrollSeen = false;
SettingValues.prefs.edit().putBoolean(SettingValues.PREF_SCROLL_SEEN, false).apply();
+
+ ((SwitchCompat) context.findViewById(R.id.settings_history_scrollseenhide)).setChecked(false);
+ ((SwitchCompat) context.findViewById(R.id.settings_history_scrollseenhide)).setEnabled(false);
+ SettingValues.scrollSeenHide = false;
+ SettingValues.prefs.edit().putBoolean(SettingValues.PREF_SCROLL_SEEN_HIDE, false).apply();
}
}
});
@@ -88,6 +94,19 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
}
});
}
+
+ {
+ SwitchCompat single = (SwitchCompat) context.findViewById(R.id.settings_history_scrollseenhide);
+ single.setChecked(SettingValues.scrollSeenHide);
+ single.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
+ SettingValues.scrollSeenHide = isChecked;
+ SettingValues.prefs.edit().putBoolean(SettingValues.PREF_SCROLL_SEEN_HIDE, isChecked).apply();
+
+ }
+ });
+ }
}
}
diff --git a/app/src/main/java/me/ccrama/redditslide/HasSeen.java b/app/src/main/java/me/ccrama/redditslide/HasSeen.java
index b640ed0378..c5e50e5a15 100644
--- a/app/src/main/java/me/ccrama/redditslide/HasSeen.java
+++ b/app/src/main/java/me/ccrama/redditslide/HasSeen.java
@@ -15,6 +15,7 @@
import java.util.HashSet;
import java.util.List;
+import me.ccrama.redditslide.SettingValues;
import me.ccrama.redditslide.Synccit.SynccitRead;
import static com.lusfold.androidkeyvaluestore.core.KVManagerImpl.COLUMN_KEY;
@@ -181,7 +182,7 @@ public static void addSeenScrolling(final Submission submission) {
SynccitRead.newVisited.add(fullname);
SynccitRead.visitedIds.add(fullname);
}
- if (hide) {
+ if (hide && SettingValues.scrollSeenHide) {
Hidden.addSubmissionToHideQueue(submission);
}
}
diff --git a/app/src/main/java/me/ccrama/redditslide/SettingValues.java b/app/src/main/java/me/ccrama/redditslide/SettingValues.java
index 46b52a2bd7..7ff1135bf0 100644
--- a/app/src/main/java/me/ccrama/redditslide/SettingValues.java
+++ b/app/src/main/java/me/ccrama/redditslide/SettingValues.java
@@ -52,6 +52,7 @@ public class SettingValues {
public static final String PREF_STORE_HISTORY = "storehistory";
public static final String PREF_STORE_NSFW_HISTORY = "storensfw";
public static final String PREF_SCROLL_SEEN = "scrollSeen";
+ public static final String PREF_SCROLL_SEEN_HIDE = "scrollSeenHide";
public static final String PREF_TITLE_FILTERS = "titleFilters";
public static final String PREF_TEXT_FILTERS = "textFilters";
public static final String PREF_DOMAIN_FILTERS = "domainFilters";
@@ -176,6 +177,7 @@ public class SettingValues {
public static boolean showNSFWContent;
public static boolean storeNSFWHistory;
public static boolean scrollSeen;
+ public static boolean scrollSeenHide;
public static boolean saveButton;
public static boolean voteGestures;
public static boolean colorEverywhere;
@@ -376,6 +378,7 @@ public static void setAllValues(SharedPreferences settings) {
upvotePercentage = prefs.getBoolean(PREF_UPVOTE_PERCENTAGE, false);
storeNSFWHistory = prefs.getBoolean(PREF_STORE_NSFW_HISTORY, false);
scrollSeen = prefs.getBoolean(PREF_SCROLL_SEEN, false);
+ scrollSeenHide = prefs.getBoolean(PREF_SCROLL_SEEN_HIDE, false);
synccitName = prefs.getString(SYNCCIT_NAME, "");
synccitAuth = prefs.getString(SYNCCIT_AUTH, "");
notifSound = prefs.getBoolean(PREF_SOUND_NOTIFS, false);
diff --git a/app/src/main/res/layout/activity_settings_history_child.xml b/app/src/main/res/layout/activity_settings_history_child.xml
index 677207de42..c20bd8052d 100644
--- a/app/src/main/res/layout/activity_settings_history_child.xml
+++ b/app/src/main/res/layout/activity_settings_history_child.xml
@@ -138,6 +138,42 @@
android:textColorHint="?attr/fontColor" />
+
+
+
+
+
+
+
+
+
+
Comment font
Crop lead image in comment view
Mark posts as seen when scrolled past
+ Hide posts when scrolled past
Custom Tabs
Select image/GIF save location
Not yet set