diff --git a/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt b/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
index d1da667e..99f7b64f 100644
--- a/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
+++ b/app/src/main/java/com/keylesspalace/tusky/MainActivity.kt
@@ -168,6 +168,11 @@ class MainActivity : BottomSheetActivity(), ActionButtonActivity, HasAndroidInje
val pageMargin = resources.getDimensionPixelSize(R.dimen.tab_page_margin)
viewPager.setPageTransformer(MarginPageTransformer(pageMargin))
+
+ val uswSwipeForTabs = PreferenceManager.getDefaultSharedPreferences(this)
+ .getBoolean("enableSwipeForTabs", true)
+ viewPager.isUserInputEnabled = uswSwipeForTabs
+
tabLayout.addOnTabSelectedListener(object : OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab) {
if (tab.position == notificationTabPosition) {
diff --git a/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt b/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt
index 4adfc4e9..290485bf 100644
--- a/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt
+++ b/app/src/main/java/com/keylesspalace/tusky/PreferencesActivity.kt
@@ -129,7 +129,7 @@ class PreferencesActivity : BaseActivity(), SharedPreferences.OnSharedPreference
}
"statusTextSize", "absoluteTimeView", "showBotOverlay", "animateGifAvatars",
- "useBlurhash", "showCardsInTimelines", "confirmReblogs" -> {
+ "useBlurhash", "showCardsInTimelines", "confirmReblogs", "enableSwipeForTabs" -> {
restartActivitiesOnExit = true
}
"language" -> {
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index bf480226..9a754467 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -541,6 +541,7 @@
Failed to search
Show Notifications filter
+ Enable swipe gesture to switch between tabs
Poll
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
index b04ccacc..d2102977 100644
--- a/app/src/main/res/xml/preferences.xml
+++ b/app/src/main/res/xml/preferences.xml
@@ -84,6 +84,12 @@
android:title="@string/pref_title_confirm_reblogs"
app:singleLineTitle="false" />
+
+