feat(settings): invert double tab to swipe setting

This commit is contained in:
FineFindus 2023-05-19 20:52:10 +02:00
parent a14e864731
commit 78acb5e7ea
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
5 changed files with 9 additions and 9 deletions

View File

@ -48,7 +48,7 @@ public class GlobalUserPreferences{
public static boolean spectatorMode;
public static boolean autoHideFab;
public static boolean defaultToUnlistedReplies;
public static boolean disableDoubleTapToSwipe;
public static boolean doubleTapToSwipe;
public static boolean compactReblogReplyLine;
public static boolean confirmBeforeReblog;
public static boolean replyLineAboveHeader;
@ -119,7 +119,7 @@ public class GlobalUserPreferences{
autoHideFab=prefs.getBoolean("autoHideFab", true);
compactReblogReplyLine=prefs.getBoolean("compactReblogReplyLine", true);
defaultToUnlistedReplies=prefs.getBoolean("defaultToUnlistedReplies", false);
disableDoubleTapToSwipe=prefs.getBoolean("disableDoubleTapToSwipe", false);
doubleTapToSwipe =prefs.getBoolean("doubleTapToSwipe", true);
replyLineAboveHeader=prefs.getBoolean("replyLineAboveHeader", true);
compactReblogReplyLine=prefs.getBoolean("compactReblogReplyLine", true);
confirmBeforeReblog=prefs.getBoolean("confirmBeforeReblog", false);
@ -180,7 +180,7 @@ public class GlobalUserPreferences{
.putString("publishButtonText", publishButtonText)
.putBoolean("bottomEncoding", bottomEncoding)
.putBoolean("defaultToUnlistedReplies", defaultToUnlistedReplies)
.putBoolean("disableDoubleTapToSwipe", disableDoubleTapToSwipe)
.putBoolean("doubleTapToSwipe", doubleTapToSwipe)
.putBoolean("compactReblogReplyLine", compactReblogReplyLine)
.putBoolean("replyLineAboveHeader", replyLineAboveHeader)
.putBoolean("confirmBeforeReblog", confirmBeforeReblog)

View File

@ -505,7 +505,7 @@ public class HomeTabFragment extends MastodonToolbarFragment implements Scrollab
@Override
public void scrollToTop(){
if (((ScrollableToTop) fragments[pager.getCurrentItem()]).isScrolledToTop() &&
!GlobalUserPreferences.disableDoubleTapToSwipe && !newPostsBtnShown) {
GlobalUserPreferences.doubleTapToSwipe && !newPostsBtnShown) {
int nextPage = (pager.getCurrentItem() + 1) % count;
navigateTo(nextPage);
return;

View File

@ -205,7 +205,7 @@ public class NotificationsFragment extends MastodonToolbarFragment implements Sc
@Override
public void scrollToTop(){
if (getFragmentForPage(pager.getCurrentItem()).isScrolledToTop() && !GlobalUserPreferences.disableDoubleTapToSwipe) {
if (getFragmentForPage(pager.getCurrentItem()).isScrolledToTop() && GlobalUserPreferences.doubleTapToSwipe) {
int nextPage = (pager.getCurrentItem() + 1) % tabViews.length;
pager.setCurrentItem(nextPage, true);
return;

View File

@ -40,8 +40,8 @@ public class BehaviourFragment extends SettingsBaseFragment{
GlobalUserPreferences.save();
needAppRestart=true;
}));
items.add(new SwitchItem(R.string.mo_disable_double_tap_to_swipe_between_tabs, R.drawable.ic_fluent_double_tap_swipe_right_24_regular, GlobalUserPreferences.disableDoubleTapToSwipe, i->{
GlobalUserPreferences.disableDoubleTapToSwipe=i.checked;
items.add(new SwitchItem(R.string.mo_double_tap_to_swipe_between_tabs, R.drawable.ic_fluent_double_tap_swipe_right_24_regular, GlobalUserPreferences.doubleTapToSwipe, i->{
GlobalUserPreferences.doubleTapToSwipe=i.checked;
GlobalUserPreferences.save();
needAppRestart=true;
}));

View File

@ -11,7 +11,7 @@
<string name="mo_hide_compose_button_while_scrolling_setting">Hide compose button while scrolling</string>
<string name="mo_welcome_text">To get started, please enter your home instances domain name below.</string>
<!-- Setting this as non-translatable as it simply doesnt change with language-->
<!-- Setting this as non-translatable as it simply doesn't change with language-->
<string name="mo_settings_app_version" translatable="false">Moshidon v%1$s (%2$d)</string>
<string name="mo_personal_note">Add a note about this profile</string>
@ -50,7 +50,7 @@
<string name="mo_duration_days_7">7 days</string>
<string name="mo_share_open_url">Open in App</string>
<string name="mo_disable_double_tap_to_swipe_between_tabs">Disable double tap to swipe between tabs</string>
<string name="mo_double_tap_to_swipe_between_tabs">Double tap to swipe between tabs</string>
<string name="mo_swap_bookmark_with_reblog">Use reblog action instead of bookmark action on notifications</string>
<string name="mo_download_latest_nightly_release">Download latest nightly release</string>
<string name="mo_load_remote_followers">Load remote profile follows and followers</string>