mirror of
https://github.com/logseq/logseq.git
synced 2026-05-17 17:32:35 +00:00
fix: old file graphs showing up in app list of graphs
Both in sidebar but also in commands to select graphs like 'Select graph to open'
This commit is contained in:
@@ -8,10 +8,10 @@
|
||||
[logseq.common.config :as common-config]
|
||||
[promesa.core :as p]))
|
||||
|
||||
(defn local-file-based-graph?
|
||||
(defn- local-file-based-graph?
|
||||
[s]
|
||||
(and (string? s)
|
||||
(string/starts-with? s common-config/file-version-prefix)))
|
||||
(string/starts-with? s (str common-config/db-version-prefix common-config/file-version-prefix))))
|
||||
|
||||
(defn get-all-graphs
|
||||
[]
|
||||
@@ -27,9 +27,9 @@
|
||||
(distinct
|
||||
(concat
|
||||
repos'
|
||||
(map (fn [repo-name]
|
||||
{:name (common-config/canonicalize-db-version-repo repo-name)})
|
||||
(some-> electron-disk-graphs bean/->clj))))))
|
||||
(->> (some-> electron-disk-graphs bean/->clj)
|
||||
(map (fn [repo-name]
|
||||
{:name (common-config/canonicalize-db-version-repo repo-name)})))))))
|
||||
|
||||
(defn delete-graph!
|
||||
[graph]
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
(p/resolved [{:name "demo"}
|
||||
{:name "logseq_db_prefixed"}
|
||||
{:name "logseq_db_logseq_db_legacy"}
|
||||
{:name "logseq_local_local-only"}]))
|
||||
{:name "logseq_db_logseq_local_local-only"}]))
|
||||
util/electron? (constantly true)
|
||||
ipc/ipc (fn [_channel]
|
||||
(p/resolved #js ["logseq_db_remote"
|
||||
@@ -25,7 +25,8 @@
|
||||
"logseq_db_remote"
|
||||
"logseq_db_remote-legacy"}
|
||||
(set names)))
|
||||
(is (not-any? #(re-find #"^logseq_db_logseq_db_" %) names))))
|
||||
(is (not-any? #(re-find #"^logseq_db_logseq_db_" %) names))
|
||||
(is (not-any? #(re-find #"logseq_local_" %) names))))
|
||||
(p/catch (fn [error]
|
||||
(is false (str error))))
|
||||
(p/finally done))))
|
||||
|
||||
Reference in New Issue
Block a user