소스 검색

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

Jacob Duba 4 년 전
부모
커밋
7a1429bcc1
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  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();