replace add-hint! with queue-hints!
This commit is contained in:
parent
874cabdb2d
commit
4458ba3ea3
|
@ -345,10 +345,14 @@
|
||||||
[namespace hint type]
|
[namespace hint type]
|
||||||
{:namespace namespace :hint hint :type type})
|
{:namespace namespace :hint hint :type type})
|
||||||
|
|
||||||
(defn add-hint!
|
(defn queue-hints!
|
||||||
"Add a hint to the system."
|
"Queues up hints in the view system so that they will be picked up by the refresh
|
||||||
[hint]
|
watcher and dispatched to the workers resulting in view updates being sent out
|
||||||
(swap! view-system update-in [:hints] (fnil conj #{}) hint))
|
for the relevant views/subscribers."
|
||||||
|
[hints]
|
||||||
|
(swap! view-system update-in [:hints]
|
||||||
|
(fn [existing-hints]
|
||||||
|
(reduce conj (or existing-hints #{}) hints))))
|
||||||
|
|
||||||
(defn put-hints!
|
(defn put-hints!
|
||||||
"Adds a collection of hints to the view system by using the view system
|
"Adds a collection of hints to the view system by using the view system
|
||||||
|
|
Loading…
Reference in a new issue