Browse Source

Revert "fix: <! can't be used without go"

This reverts commit 9b41de8ad9af52a88f8c28bfeff7d920f7171a40.
rcmerci 2 years ago
parent
commit
279dbf7de3
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/main/frontend/fs/sync.cljs

+ 6 - 6
src/main/frontend/fs/sync.cljs

@@ -779,7 +779,7 @@
 (declare <rsapi-cancel-all-requests)
 
 (defn- build-local-file-metadatas
-  [this graph-uuid result read-chan!]
+  [this graph-uuid result]
   (loop [[[path metadata] & others] (js->clj result)
          result #{}]
     (if-not (and path metadata)
@@ -787,7 +787,7 @@
       result
       (let [normalized-path (path-normalize path)
             encryptedFname (if (not= path normalized-path)
-                             (first (read-chan! (<encrypt-fnames this graph-uuid [normalized-path])))
+                             (first (<! (<encrypt-fnames this graph-uuid [normalized-path])))
                              (get metadata "encryptedFname"))]
         (recur others
                (conj result
@@ -816,12 +816,12 @@
       (let [r (<! (<retry-rsapi #(p->c (ipc/ipc "get-local-all-files-meta" graph-uuid base-path))))]
         (if (instance? ExceptionInfo r)
           r
-          (build-local-file-metadatas this graph-uuid r <!)))))
+          (build-local-file-metadatas this graph-uuid r)))))
   (<get-local-files-meta [this graph-uuid base-path filepaths]
     (go
       (let [r (<! (<retry-rsapi #(p->c (ipc/ipc "get-local-files-meta" graph-uuid base-path filepaths))))]
         (assert (not (instance? ExceptionInfo r)) "get-local-files-meta shouldn't return exception")
-        (build-local-file-metadatas this graph-uuid r <!))))
+        (build-local-file-metadatas this graph-uuid r))))
   (<rename-local-file [_ graph-uuid base-path from to]
     (<retry-rsapi #(p->c (ipc/ipc "rename-local-file" graph-uuid base-path
                                   (path-normalize from)
@@ -900,7 +900,7 @@
                                                                                :basePath base-path}))))]
         (if (instance? ExceptionInfo r)
           r
-          (build-local-file-metadatas this graph-uuid (.-result r) <!)))))
+          (build-local-file-metadatas this graph-uuid (.-result r))))))
 
   (<get-local-files-meta [this graph-uuid base-path filepaths]
     (go
@@ -909,7 +909,7 @@
                                                       :basePath base-path
                                                       :filePaths filepaths}))))]
         (assert (not (instance? ExceptionInfo r)) "get-local-files-meta shouldn't return exception")
-        (build-local-file-metadatas this graph-uuid (.-result r) <!))))
+        (build-local-file-metadatas this graph-uuid (.-result r)))))
 
   (<rename-local-file [_ graph-uuid base-path from to]
     (p->c (.renameLocalFile mobile-util/file-sync