浏览代码

fix: quick add shortcut doesn't open block to edit

Tienson Qin 1 月之前
父节点
当前提交
e61a398d97
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 2 0
      src/main/frontend/handler/editor.cljs
  2. 2 1
      src/main/mobile/deeplink.cljs

+ 2 - 0
src/main/frontend/handler/editor.cljs

@@ -4061,6 +4061,8 @@
 (defn quick-add-open-last-block!
   []
   (when-let [add-page (ldb/get-built-in-page (db/get-db) common-config/quick-add-page-name)]
+    (prn :debug :add-page add-page
+         :children (:block/_parent add-page))
     (when (:block/_parent add-page)
       (let [block (last (ldb/sort-by-order (:block/_parent add-page)))]
         (edit-block! block :max {:container-id :unknown-container})))))

+ 2 - 1
src/main/mobile/deeplink.cljs

@@ -3,6 +3,7 @@
   (:require [clojure.string :as string]
             [frontend.config :as config]
             [frontend.db.async :as db-async]
+            [frontend.handler.editor :as editor-handler]
             [frontend.handler.notification :as notification]
             [frontend.handler.route :as route-handler]
             [frontend.mobile.intent :as intent]
@@ -36,7 +37,7 @@
       (and (= hostname "mobile") (= pathname "/go/audio"))
       (state/pub-event! [:mobile/start-audio-record])
       (and (= hostname "mobile") (= pathname "/go/quick-add"))
-      (state/pub-event! [:dialog/mobile-quick-add])
+      (editor-handler/show-quick-add)
       (= hostname "graph")
       (let [graph-name (some-> pathname
                                (string/replace "/" "")