chore: remove unnesessary state settings

feat/datascript-storage-test
Tienson Qin 2023-12-11 23:10:10 +08:00
parent 61b2681c2a
commit 7ad4f4566f
1 changed files with 1 additions and 5 deletions

View File

@ -60,7 +60,6 @@
all-graphs (->> (state/get-repos)
(map #(text-util/get-graph-name-from-path (:url %)))
set)]
(state/set-state! :graph/importing :logseq)
(cond
(string/blank? graph-name)
(notification/show! "Empty graph name." :error)
@ -73,10 +72,7 @@
(set! (.-onload reader)
(fn []
(let [buffer (.-result ^js reader)]
(import-handler/import-from-sqlite-db! buffer graph-name
(fn []
(state/set-state! :graph/importing nil)
(finished-cb))))))
(import-handler/import-from-sqlite-db! buffer graph-name finished-cb))))
(set! (.-onerror reader) (fn [e] (js/console.error e)))
(set! (.-onabort reader) (fn [e]
(prn :debug :aborted)