fix: reload app only on mobile

This commit is contained in:
Tienson Qin
2025-10-11 18:29:48 +08:00
parent 52a736922e
commit 814707054b
8 changed files with 28 additions and 27 deletions

View File

@@ -932,7 +932,7 @@
block-parent (get uuid->dom-block (:block/uuid block))
sibling-block (when block-parent (util/get-prev-block-non-collapsed-non-embed block-parent))
blocks' (block-handler/get-top-level-blocks blocks)
mobile? (util/capacitor-new?)]
mobile? (util/capacitor?)]
(p/do!
(when (and sibling-block (not mobile?))
(let [{:keys [edit-block-f]} (move-to-prev-block repo sibling-block
@@ -1056,7 +1056,7 @@
(assoc :db/id (:db/id b)))))))]
(common-handler/copy-to-clipboard-without-id-property! repo (get block :block/format :markdown) content (when html? html) copied-blocks))
(state/set-block-op-type! :copy)
(when-not (util/capacitor-new?)
(when-not (util/capacitor?)
(notification/show! "Copied!" :success)))))
(defn copy-block-refs

View File

@@ -90,7 +90,7 @@
(defmethod events/handle :redirect-to-home [_]
(page-handler/create-today-journal!)
(when (util/capacitor-new?)
(when (util/capacitor?)
(mobile-state/redirect-to-tab! "home")))
(defmethod events/handle :page/show-delete-dialog [[_ selected-rows ok-handler]]