|
@@ -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])))
|