mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 08:56:29 +00:00
fix: don't clear selection in blocks
This commit is contained in:
@@ -914,14 +914,15 @@ Similar to re-frame subscriptions"
|
||||
(when-let [input (get-input)]
|
||||
(util/get-selection-start input)))
|
||||
|
||||
(defn set-selection-start-block!
|
||||
[start-block]
|
||||
(swap! state assoc :selection/start-block start-block))
|
||||
|
||||
(defn get-selection-start-block
|
||||
[]
|
||||
(get @state :selection/start-block))
|
||||
|
||||
(defn set-selection-start-block!
|
||||
[start-block]
|
||||
(when-not (get-selection-start-block)
|
||||
(swap! state assoc :selection/start-block start-block)))
|
||||
|
||||
(defn set-selection-blocks!
|
||||
([blocks]
|
||||
(set-selection-blocks! blocks :down))
|
||||
@@ -942,7 +943,8 @@ Similar to re-frame subscriptions"
|
||||
(swap! state assoc
|
||||
:selection/mode false
|
||||
:selection/blocks nil
|
||||
:selection/direction :down))
|
||||
:selection/direction :down
|
||||
:selection/start-block nil))
|
||||
|
||||
(defn get-selection-blocks
|
||||
[]
|
||||
@@ -1963,4 +1965,4 @@ Similar to re-frame subscriptions"
|
||||
(defn get-icloud-container-root-url
|
||||
[]
|
||||
(when (mobile-util/native-ios?)
|
||||
(get-in @state [:mobile/container-urls :iCloudContainerUrl])))
|
||||
(get-in @state [:mobile/container-urls :iCloudContainerUrl])))
|
||||
|
||||
Reference in New Issue
Block a user