summary refs log tree commit diff
path: root/resources
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2024-01-07 19:52:44 +0100
committerGitHub <noreply@github.com>2024-01-07 19:52:44 +0100
commit96c4d05730cc557722a31a0dd9036ac9e0744611 (patch)
treedfcc8472c6f70cdfd48a60583f659118cc584929 /resources
parentRemove appveyor badge (diff)
parentlint (diff)
downloadnheko-96c4d05730cc557722a31a0dd9036ac9e0744611.tar.xz
Merge pull request #1649 from duarm/swipe-toggle
disable swipe motions toggle
Diffstat (limited to 'resources')
-rw-r--r--resources/langs/nheko_en.ts5
-rw-r--r--resources/qml/TimelineDefaultMessageStyle.qml1
-rw-r--r--resources/qml/components/AdaptiveLayout.qml2
3 files changed, 7 insertions, 1 deletions
diff --git a/resources/langs/nheko_en.ts b/resources/langs/nheko_en.ts
index e63a917b..71688c8f 100644
--- a/resources/langs/nheko_en.ts
+++ b/resources/langs/nheko_en.ts
@@ -4788,6 +4788,11 @@ Reason: %4</translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>Disable swipe motions</source>
+        <translation>Disable swipe motions</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Font size</source>
         <translation>Font size</translation>
     </message>
diff --git a/resources/qml/TimelineDefaultMessageStyle.qml b/resources/qml/TimelineDefaultMessageStyle.qml
index 661aabdc..a4466442 100644
--- a/resources/qml/TimelineDefaultMessageStyle.qml
+++ b/resources/qml/TimelineDefaultMessageStyle.qml
@@ -272,6 +272,7 @@ TimelineEvent {
 
             DragHandler {
                 id: replyDragHandler
+                enabled: !Settings.disableSwipe
                 yAxis.enabled: false
                 xAxis.enabled: true
                 xAxis.minimum: wrapper.avatarMargin - 100
diff --git a/resources/qml/components/AdaptiveLayout.qml b/resources/qml/components/AdaptiveLayout.qml
index 86a0d4b6..eb8ec341 100644
--- a/resources/qml/components/AdaptiveLayout.qml
+++ b/resources/qml/components/AdaptiveLayout.qml
@@ -126,7 +126,7 @@ Container {
         snapMode: ListView.SnapOneItem
         orientation: ListView.Horizontal
         highlightRangeMode: ListView.StrictlyEnforceRange
-        interactive: singlePageMode
+        interactive: !Settings.disableSwipe && singlePageMode
         highlightMoveDuration: (container.singlePageMode && !Settings.reducedMotion) ? 200 : 0
         currentIndex: container.singlePageMode ? container.pageIndex : 0
         boundsBehavior: Flickable.StopAtBounds