Update docstrings after Tienson's shortcuts fix

Also remove unused :db-schema
This commit is contained in:
Gabriel Horner
2022-09-06 09:35:34 -04:00
committed by Andelf
parent bfe8d46945
commit 12b8592f9b
6 changed files with 8 additions and 18 deletions

View File

@@ -30,14 +30,12 @@
[frontend.modules.outliner.file :as file]
[frontend.modules.shortcut.core :as shortcut]
[frontend.state :as state]
[frontend.storage :as storage]
[frontend.ui :as ui]
[frontend.util :as util]
[frontend.util.persist-var :as persist-var]
[goog.object :as gobj]
[lambdaisland.glogi :as log]
[promesa.core :as p]
[logseq.db.schema :as db-schema]))
[promesa.core :as p]))
(defn set-global-error-notification!
[]
@@ -75,11 +73,6 @@
(state/pub-event! [:instrument {:type :blocks/count
:payload {:total (db/blocks-count)}}])))
(defn store-schema!
[]
(storage/set :db-schema (assoc db-schema/schema
:db/version db-schema/version)))
(defn restore-and-setup!
[repos]
(when-let [repo (or (state/get-current-repo) (:url (first repos)))]
@@ -112,7 +105,6 @@
(p/then
(fn []
(js/console.log "db restored, setting up repo hooks")
(store-schema!)
(state/pub-event! [:modal/nfs-ask-permission])

View File

@@ -1,6 +1,6 @@
(ns frontend.handler.global-config
"This ns is a system component that encapsulates global config functionality.
Unlike repo config, this also manages a directory for configuration. This app
Unlike repo config, this also manages a directory for configuration. This
component depends on a repo."
(:require [frontend.config :as config]
[frontend.fs :as fs]
@@ -44,7 +44,7 @@
(set-global-config-state! default-content)))))
(defn restore-global-config!
"Sets global config state from db"
"Sets global config state from config file"
[]
(let [config-dir (global-config-dir)
config-path (global-config-path)]
@@ -69,7 +69,7 @@
(defn start
"This component has four responsibilities on start:
- Fetch root-dir for later use with config paths
- Manage db and ui state of global config
- Manage ui state of global config
- Create a global config dir and file if it doesn't exist
- Start a file watcher for global config dir"
[{:keys [repo]}]

View File

@@ -382,7 +382,7 @@
_ (db/restore-graph! repo)
_ (repo-config-handler/restore-repo-config! repo)
_ (global-config-handler/restore-global-config!)]
;; Don't have to unlisten the old listerner, as it will be destroyed with the conn
;; Don't have to unlisten the old listener, as it will be destroyed with the conn
(db/listen-and-persist! repo)
(state/pub-event! [:shortcut/refresh])
(ui-handler/add-style-if-exists!)

View File

@@ -1,7 +1,7 @@
(ns frontend.handler.repo-config
"This ns is a system component that encapsulates repo config functionality.
This component only concerns itself with one user-facing repo config file,
logseq/config.edn. In the future it may manage more files. This app component
logseq/config.edn. In the future it may manage more files. This component
depends on a repo."
(:require [frontend.db :as db]
[frontend.config :as config]

View File

@@ -252,7 +252,7 @@
:go/electron-find-in-page {:binding "mod+f"
:inactive (not (util/electron?))
:fn #(search-handler/open-find-in-page!)}
:go/electron-jump-to-the-next {:binding ["enter" "mod+g"]
:inactive (not (util/electron?))
:fn #(search-handler/loop-find-in-page! false)}

View File

@@ -3,7 +3,6 @@
#?(:cljs (:require [cljs.spec.alpha :as s])
:default (:require [clojure.spec.alpha :as s])))
(s/def ::db-schema map?)
(s/def ::ls-right-sidebar-state map?)
(s/def ::ls-right-sidebar-width string?)
(s/def ::ls-left-sidebar-open? boolean?)
@@ -36,8 +35,7 @@
(s/def ::local-storage
;; All these keys are optional since we usually only validate one key at a time
(s/keys
:opt-un [::db-schema
::ls-right-sidebar-state
:opt-un [::ls-right-sidebar-state
::ls-right-sidebar-width
::ls-left-sidebar-open?
:ui/theme