Browse Source

Fix regression: reset touch-item if not in /unread

Jacob Duba 4 years ago
parent
commit
7a1429bcc1
1 changed files with 5 additions and 2 deletions
  1. 5 2
      ui/static/js/touch_handler.js

+ 5 - 2
ui/static/js/touch_handler.js

@@ -75,10 +75,13 @@ class TouchHandler {
 
 
             if (distance > 75) {
             if (distance > 75) {
                 toggleEntryStatus(this.touch.element);
                 toggleEntryStatus(this.touch.element);
-	    } else {
+            } 
+
+            // If not on the unread page, undo transform of the dragged element.
+            if (document.URL.split("/").indexOf("unread") == -1 || distance <= 75) {
                 this.touch.element.style.opacity = 1;
                 this.touch.element.style.opacity = 1;
                 this.touch.element.style.transform = "none";
                 this.touch.element.style.transform = "none";
-	    }
+            }
         }
         }
 
 
         this.reset();
         this.reset();