Skip to content

Commit

Permalink
Removed setting to toggle SwipeBack from web
Browse files Browse the repository at this point in the history
This is too much - I think it shouldn't have been there in the first place
  • Loading branch information
SimonHalvdansson committed Sep 16, 2023
1 parent 8661c52 commit 0e975be
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
public class CommentsActivity extends AppCompatActivity implements CommentsFragment.BottomSheetFragmentCallback {
public static String PREVENT_BACK = "PREVENT_BACK";

private boolean disableSwipeAtWeb;
private boolean disableSwipeAtComments;
private SwipeBackLayout swipeBackLayout;
private SplitChangeHandler splitChangeHandler;
Expand Down Expand Up @@ -52,7 +51,6 @@ public void onViewSwipeFinished(View mView, boolean isEnd) {
}
});

disableSwipeAtWeb = SettingsUtils.shouldDisableWebviewSwipeBack(getApplicationContext());
disableSwipeAtComments = SettingsUtils.shouldDisableCommentsSwipeBack(getApplicationContext());
}

Expand All @@ -63,9 +61,7 @@ public void onSwitchView(boolean isAtWebView) {
return;
}

if (isAtWebView) {
swipeBackLayout.setActive(!disableSwipeAtWeb);
} else {
if (!isAtWebView) {
swipeBackLayout.setActive(!disableSwipeAtComments);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ public boolean onPreferenceChange(Preference preference, Object newValue) {
"pref_preload_webview",
"pref_webview_match_theme",
"pref_webview_adblock",
"pref_webview_disable_swipeback",
"pref_webview_show_expand",
"pref_webview_device_back"
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,6 @@ public static boolean shouldBlockAds(Context ctx) {
return getBooleanPref("pref_webview_adblock", false, ctx);
}

public static boolean shouldDisableWebviewSwipeBack(Context ctx) {
return getBooleanPref("pref_webview_disable_swipeback", true, ctx);
}

public static boolean shouldDisableCommentsSwipeBack(Context ctx) {
return getBooleanPref("pref_comments_disable_swipeback", false, ctx);
}
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/res/xml/root_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,6 @@
app:icon="@drawable/ic_action_block"
app:title="Block WebView ads" />

<SwitchPreferenceCompat
app:singleLineTitle="false"
app:key="pref_webview_disable_swipeback"
app:defaultValue="true"
app:summary="Simplifies panning on webpages"
app:icon="@drawable/ic_action_swipe"
app:title="Disable swipe back from WebView" />

<SwitchPreferenceCompat
app:singleLineTitle="false"
app:key="pref_webview_show_expand"
Expand Down

0 comments on commit 0e975be

Please sign in to comment.