mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 17:06:23 +00:00
enhance: select iCloud folder first when select existing graph
This commit is contained in:
@@ -275,18 +275,18 @@
|
||||
{:keys [path localDocumentsPath]} (-> (.pickFolder mobile-util/folder-picker
|
||||
(clj->js (when (and dir (mobile-util/native-ios?))
|
||||
{:path dir})))
|
||||
(p/then #(js->clj % :keywordize-keys true))
|
||||
(p/catch (fn [e]
|
||||
(js/alert (str e))
|
||||
nil))) ;; NOTE: If pick folder fails, let it crash
|
||||
_ (when (and (mobile-util/native-ios?)
|
||||
(not (or (local-container-path? path localDocumentsPath)
|
||||
(mobile-util/iCloud-container-path? path))))
|
||||
(state/pub-event! [:modal/show-instruction]))
|
||||
_ (js/console.log "Opening or Creating graph at directory: " path)
|
||||
files (readdir path)
|
||||
files (js->clj files :keywordize-keys true)]
|
||||
(into [] (concat [{:path path}] files))))
|
||||
(p/then #(js->clj % :keywordize-keys true))
|
||||
(p/catch (fn [e]
|
||||
(js/alert (str e))
|
||||
nil))) ;; NOTE: If pick folder fails, let it crash
|
||||
_ (when (and (mobile-util/native-ios?)
|
||||
(not (or (local-container-path? path localDocumentsPath)
|
||||
(mobile-util/iCloud-container-path? path))))
|
||||
(state/pub-event! [:modal/show-instruction]))
|
||||
_ (js/console.log "Opening or Creating graph at directory: " path)
|
||||
files (readdir path)
|
||||
files (js->clj files :keywordize-keys true)]
|
||||
(into [] (concat [{:path path}] files))))
|
||||
|
||||
(defrecord ^:large-vars/cleanup-todo Capacitorfs []
|
||||
protocol/Fs
|
||||
|
||||
Reference in New Issue
Block a user