1
0
charlie 4 жил өмнө
parent
commit
4875e5b367

+ 1 - 1
src/electron/electron/handler.cljs

@@ -65,7 +65,7 @@
     (vec (cons {:path (fix-win-path! path)} result))))
 
 ;; TODO: Is it going to be slow if it's a huge directory
-(defmethod handle :openDir [window _messages]
+(defmethod handle :openDir [^js window _messages]
   (let [result (.showOpenDialogSync dialog (bean/->js
                                             {:properties ["openDirectory"]}))
         path (first result)]

+ 10 - 10
src/main/frontend/util.cljc

@@ -399,20 +399,20 @@
                           :behavior "smooth"}))))))
 
 #?(:cljs
-    (defn scroll-to
-      ([pos]
-       (scroll-to pos true))
-      ([pos animate?]
-       (scroll-to (app-scroll-container-node) pos animate?))
-      ([node pos animate?]
-       (.scroll node
-                #js {:top      pos
-                     :behavior (if animate? "smooth" "auto")}))))
+   (defn scroll-to
+     ([pos]
+      (scroll-to (app-scroll-container-node) pos))
+     ([node pos]
+      (scroll-to node pos true))
+     ([node pos animate?]
+      (.scroll node
+               #js {:top      pos
+                    :behavior (if animate? "smooth" "auto")}))))
 
 #?(:cljs
     (defn scroll-to-top
       []
-      (scroll-to 0 false)))
+      (scroll-to (app-scroll-container-node) 0 false)))
 
 (defn url-encode
   [string]