feat: add refresh progressing animation

This commit is contained in:
Tienson Qin
2020-12-03 00:06:49 +08:00
parent bcb40c6629
commit 0dce7cdb11
4 changed files with 20 additions and 6 deletions

View File

@@ -154,6 +154,7 @@
dir-name (config/get-local-dir repo)
handle-path (str config/local-handle-prefix dir-name)
path-handles (atom {})]
(state/set-graph-syncing? true)
(p/let [handle (idb/get-item handle-path)
files-result (utils/getFiles handle true
(fn [path handle]
@@ -196,7 +197,9 @@
{:diffs diffs
:nfs-files modified-files})))))
(p/catch (fn [error]
(log/error :nfs/load-files-error error))))))))
(log/error :nfs/load-files-error error)))
(p/finally (fn [_]
(state/set-graph-syncing? false))))))))
(defn- refresh!
[repo]