Skip to content

Commit

Permalink
Disable double-tap mobile gesture if swipe gesture is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanpasu64 authored and fguillot committed Dec 7, 2022
1 parent de92e3e commit b6c368c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion locale/translations/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"form.prefs.select.alphabetical": "Alphabetical",
"form.prefs.select.unread_count": "Unread count",
"form.prefs.label.keyboard_shortcuts": "Enable keyboard shortcuts",
"form.prefs.label.entry_swipe": "Enable swipe gesture on entries on mobile",
"form.prefs.label.entry_swipe": "Enable swipe and double-tap gestures on entries on mobile",
"form.prefs.label.show_reading_time": "Show estimated reading time for entries",
"form.prefs.label.custom_css": "Custom CSS",
"form.prefs.label.entry_order": "Entry sorting column",
Expand Down
2 changes: 1 addition & 1 deletion template/templates/views/entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h1 dir="auto">
</div>
{{ end }}
{{ end }}
<article role="article" class="entry-content" dir="auto">
<article role="article" class="entry-content {{ if $.user.EntrySwipe }}double-tap{{ end }}" dir="auto">
{{ if .user }}
{{ noescape (proxyFilter .entry.Content) }}
{{ else }}
Expand Down
2 changes: 1 addition & 1 deletion ui/static/js/touch_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TouchHandler {
});

let entryContentElement = document.querySelector(".entry-content");
if (entryContentElement) {
if (entryContentElement && entryContentElement.classList.contains('double-tap')) {
let doubleTapTimers = {
previous: null,
next: null
Expand Down

0 comments on commit b6c368c

Please sign in to comment.