From 19c2d0b9794b1b045a2015769567e6ddf6a5fbfe Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Tue, 14 Jul 2020 19:43:26 +0800 Subject: [PATCH] Disable swipe right to go back in some Activities. Rename 'Swipe Right to Go Back From Comments' to 'Swipe Right to Go Back'. --- app/src/main/AndroidManifest.xml | 10 +++++----- .../Activity/AccountPostsActivity.java | 2 +- .../Activity/AccountSavedThingActivity.java | 2 +- .../infinityforreddit/Activity/CommentActivity.java | 2 +- .../Activity/CreateMultiRedditActivity.java | 2 +- .../Activity/EditCommentActivity.java | 2 +- .../Activity/EditMultiRedditActivity.java | 2 +- .../infinityforreddit/Activity/EditPostActivity.java | 2 +- .../Activity/FilteredThingActivity.java | 2 +- .../infinityforreddit/Activity/InboxActivity.java | 2 +- .../infinityforreddit/Activity/LoginActivity.java | 2 +- .../infinityforreddit/Activity/PostImageActivity.java | 8 +------- .../infinityforreddit/Activity/PostLinkActivity.java | 8 +------- .../infinityforreddit/Activity/PostTextActivity.java | 8 +------- .../infinityforreddit/Activity/PostVideoActivity.java | 8 +------- .../infinityforreddit/Activity/ReportActivity.java | 2 +- .../infinityforreddit/Activity/RulesActivity.java | 2 +- .../infinityforreddit/Activity/SearchActivity.java | 2 +- .../Activity/SearchResultActivity.java | 2 +- .../Activity/SearchSubredditsResultActivity.java | 2 +- .../Activity/SelectedSubredditsActivity.java | 2 +- .../Activity/SubredditMultiselectionActivity.java | 2 +- .../Activity/SubredditSelectionActivity.java | 2 +- .../Activity/SubscribedThingListingActivity.java | 2 +- .../Activity/ThemePreviewActivity.java | 2 +- .../Activity/ViewMultiRedditDetailActivity.java | 2 +- .../Activity/ViewPostDetailActivity.java | 2 +- .../Activity/ViewPrivateMessagesActivity.java | 6 ------ .../Activity/ViewSubredditDetailActivity.java | 2 +- .../Activity/ViewUserDetailActivity.java | 2 +- .../Utils/SharedPreferencesUtils.java | 2 +- app/src/main/res/values/strings.xml | 3 ++- .../main/res/xml/gestures_and_buttons_preference.xml | 3 ++- 33 files changed, 38 insertions(+), 66 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a1e0577c..b4f549ff 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -37,7 +37,7 @@ = Build.VERSION_CODES.M && isChangeStatusBarIconColor()) { addOnOffsetChangedListener(appBarLayout); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java index e3e7dc48..46f0df8c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java @@ -25,7 +25,6 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.snackbar.Snackbar; import com.libRG.CustomTextView; -import com.r0adkll.slidr.Slidr; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -38,17 +37,16 @@ import butterknife.ButterKnife; import jp.wasabeef.glide.transformations.RoundedCornersTransformation; import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.LoadSubredditIconAsyncTask; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitTextOrLinkPostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.Service.SubmitPostService; import ml.docilealligator.infinityforreddit.Utils.APIUtils; -import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import pl.droidsonroids.gif.GifImageView; import retrofit2.Retrofit; @@ -152,10 +150,6 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { - Slidr.attach(this); - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && isChangeStatusBarIconColor()) { addOnOffsetChangedListener(appBarLayout); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java index f6d972da..2a666d5b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java @@ -25,7 +25,6 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.snackbar.Snackbar; import com.libRG.CustomTextView; -import com.r0adkll.slidr.Slidr; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -38,17 +37,16 @@ import butterknife.ButterKnife; import jp.wasabeef.glide.transformations.RoundedCornersTransformation; import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.LoadSubredditIconAsyncTask; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitTextOrLinkPostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.Service.SubmitPostService; import ml.docilealligator.infinityforreddit.Utils.APIUtils; -import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import pl.droidsonroids.gif.GifImageView; import retrofit2.Retrofit; @@ -152,10 +150,6 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { - Slidr.attach(this); - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && isChangeStatusBarIconColor()) { addOnOffsetChangedListener(appBarLayout); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java index aeb8b70d..2431e16d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java @@ -37,7 +37,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; import com.libRG.CustomTextView; -import com.r0adkll.slidr.Slidr; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -50,16 +49,15 @@ import butterknife.ButterKnife; import jp.wasabeef.glide.transformations.RoundedCornersTransformation; import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.LoadSubredditIconAsyncTask; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitVideoPostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.Service.SubmitPostService; -import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import pl.droidsonroids.gif.GifImageView; import retrofit2.Retrofit; @@ -185,10 +183,6 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { - Slidr.attach(this); - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && isChangeStatusBarIconColor()) { addOnOffsetChangedListener(appBarLayout); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java index b05d41ab..bc70c30d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ReportActivity.java @@ -88,7 +88,7 @@ public class ReportActivity extends BaseActivity { applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java index 809fafa2..5334e72b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/RulesActivity.java @@ -81,7 +81,7 @@ public class RulesActivity extends BaseActivity { applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java index d46bfce0..3fd343f4 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchActivity.java @@ -88,7 +88,7 @@ public class SearchActivity extends BaseActivity { applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java index fa2ceaa9..c905cdfc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java @@ -111,7 +111,7 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchSubredditsResultActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchSubredditsResultActivity.java index 21c80e60..56259a87 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchSubredditsResultActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchSubredditsResultActivity.java @@ -78,7 +78,7 @@ public class SearchSubredditsResultActivity extends BaseActivity implements Acti applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SelectedSubredditsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SelectedSubredditsActivity.java index 9145f102..3c9b7aba 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SelectedSubredditsActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SelectedSubredditsActivity.java @@ -68,7 +68,7 @@ public class SelectedSubredditsActivity extends BaseActivity implements Activity applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditMultiselectionActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditMultiselectionActivity.java index c3a1e4f8..17caab96 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditMultiselectionActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditMultiselectionActivity.java @@ -99,7 +99,7 @@ public class SubredditMultiselectionActivity extends BaseActivity implements Act applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditSelectionActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditSelectionActivity.java index 4bf4234c..20e3955f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditSelectionActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubredditSelectionActivity.java @@ -97,7 +97,7 @@ public class SubredditSelectionActivity extends BaseActivity implements Activity applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubscribedThingListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubscribedThingListingActivity.java index 38a2f84c..5c60f743 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubscribedThingListingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SubscribedThingListingActivity.java @@ -114,7 +114,7 @@ public class SubscribedThingListingActivity extends BaseActivity implements Acti applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java index 79f1a8b3..af122dee 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ThemePreviewActivity.java @@ -221,7 +221,7 @@ public class ThemePreviewActivity extends AppCompatActivity { applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java index e709b991..8e172c23 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java @@ -109,7 +109,7 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java index 4bb7ce90..0fbc96b2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java @@ -227,7 +227,7 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS mSavedIcon = getMenuItemIcon(R.drawable.ic_bookmark_toolbar_24dp); mUnsavedIcon = getMenuItemIcon(R.drawable.ic_bookmark_border_toolbar_24dp); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPrivateMessagesActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPrivateMessagesActivity.java index 3f8835e9..ea162250 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPrivateMessagesActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPrivateMessagesActivity.java @@ -20,7 +20,6 @@ import androidx.transition.TransitionManager; import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.snackbar.Snackbar; -import com.r0adkll.slidr.Slidr; import org.greenrobot.eventbus.EventBus; @@ -43,7 +42,6 @@ import ml.docilealligator.infinityforreddit.Message.ReadMessage; import ml.docilealligator.infinityforreddit.Message.ReplyMessage; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; -import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import retrofit2.Retrofit; public class ViewPrivateMessagesActivity extends BaseActivity implements ActivityToolbarInterface { @@ -109,10 +107,6 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { - Slidr.attach(this); - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M && isChangeStatusBarIconColor()) { addOnOffsetChangedListener(mAppBarLayout); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java index 638ca37e..3c8625c7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java @@ -215,7 +215,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java index 04847b7f..426f6504 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java @@ -190,7 +190,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele applyCustomTheme(); - if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL, true)) { + if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_RIGHT_TO_GO_BACK, true)) { mSlidrInterface = Slidr.attach(this); } 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 245f2e1d..c4eba6f8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java @@ -79,7 +79,7 @@ public class SharedPreferencesUtils { public static final String DEFAULT_POST_LAYOUT_KEY = "default_post_layout"; public static final String SHOW_DIVIDER_IN_COMPACT_LAYOUT = "show_divider_in_compact_layout"; public static final String SHOW_THUMBNAIL_ON_THE_LEFT_IN_COMPACT_LAYOUT = "show_thumbnail_on_the_left_in_compact_layout"; - public static final String SWIPE_RIGHT_TO_GO_BACK_FROM_POST_DETAIL = "swipe_to_go_back_from_post_detail"; + public static final String SWIPE_RIGHT_TO_GO_BACK = "swipe_to_go_back_from_post_detail"; public static final String VOLUME_KEYS_NAVIGATE_COMMENTS = "volume_keys_navigate_comments"; public static final String VOLUME_KEYS_NAVIGATE_POSTS = "volume_keys_navigate_posts"; public static final String MUTE_VIDEO = "mute_video"; diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c0cee539..eb0e5557 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -377,7 +377,8 @@ Show Divider in Compact Layout Show Thumbnail on the Left in Compact Layout Swap Tap and Long Press in Comments - Swipe Right to Go Back From Comments + Swipe Right to Go Back + Does not apply to all pages Lock Jump to Next Top-level Comment Button Lock Bottom Navigation Bar Swipe Up to Hide Jump to Next Top-level Comment Button diff --git a/app/src/main/res/xml/gestures_and_buttons_preference.xml b/app/src/main/res/xml/gestures_and_buttons_preference.xml index 8cd307e0..7a279247 100644 --- a/app/src/main/res/xml/gestures_and_buttons_preference.xml +++ b/app/src/main/res/xml/gestures_and_buttons_preference.xml @@ -4,7 +4,8 @@ + app:title="@string/settings_swipe_to_go_back_title" + app:summary="@string/settings_swipe_to_go_back_summary" />