Browse Source

Remove unused fns detected by carve

Gabriel Horner 3 years ago
parent
commit
6e7730729d

+ 0 - 4
src/main/frontend/config.cljs

@@ -253,10 +253,6 @@
   [path]
   (util/starts-with? path default-draw-directory))
 
-(defn journal?
-  [path]
-  (string/includes? path (str (get-journals-directory) "/")))
-
 (defonce local-repo "local")
 
 (defn demo-graph?

+ 0 - 6
src/main/frontend/db/model.cljs

@@ -1247,12 +1247,6 @@
          (reset! blocks-count-cache n)
          n)))))
 
-(defn get-all-block-uuids
-  []
-  (when-let [conn (conn/get-conn)]
-    (->> (d/datoms conn :avet :block/uuid)
-         (map :v))))
-
 ;; block/uuid and block/content
 (defn get-all-block-contents
   []

+ 0 - 5
src/main/frontend/search/db.cljs

@@ -1,5 +1,4 @@
 (ns frontend.search.db
-  (:refer-clojure :exclude [empty?])
   (:require [cljs-bean.core :as bean]
             [clojure.string :as string]
             [frontend.db :as db]
@@ -9,10 +8,6 @@
 
 (defonce indices (atom nil))
 
-(defn empty?
-  [repo]
-  (nil? (get @indices repo)))
-
 (defn block->index
   "Convert a block to the index for searching"
   [{:block/keys [uuid page content] :as block}]

+ 0 - 8
src/main/frontend/text.cljs

@@ -231,14 +231,6 @@
   [img-formats s]
   (some (fn [fmt] (util/safe-re-find (re-pattern (str "(?i)\\." fmt "(?:\\?([^#]*))?(?:#(.*))?$")) s)) img-formats))
 
-(defn scheduled-deadline-dash->star
-  [content]
-  (-> content
-      (string/replace "- TODO -> DONE [" "* TODO -> DONE [")
-      (string/replace "- DOING -> DONE [" "* DOING -> DONE [")
-      (string/replace "- LATER -> DONE [" "* LATER -> DONE [")
-      (string/replace "- NOW -> DONE [" "* NOW -> DONE [")))
-
 (defn remove-indentation-spaces
   [s level remove-first-line?]
   (let [lines (string/split-lines s)