Skip to content

Commit

Permalink
fire tx handlers to trigger posh and other listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
metasoarous committed May 8, 2019
1 parent 3b1cac4 commit 65b2406
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/dat/sync/client.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -753,10 +753,16 @@
:else (do
(log/info "treating bootstrap as tx")
(reactor/resolve-to app db
[[::recv-remote-tx data]])))]
(reactor/with-effect
[[::recv-remote-tx data]])))
tx-report {:db-before db
:db-after bootstrapped-db
:tx-data (d/datoms bootstrapped-db :eavt)
:tempids {}
:tx-meta nil}]
(reactor/with-effects
;; This message will fire once the reaction has complete (that is, once the data is bootstrapped; It' lets you decide how your application
[:dat.reactor/dispatch! [:dat.sync.client.bootstrap/complete? true]]
[[:dat.reactor/dispatch! [:dat.sync.client.bootstrap/complete? true]]
[:dat.reactor/execute-tx-report-handlers! tx-report]]
bootstrapped-db))))


Expand Down

0 comments on commit 65b2406

Please sign in to comment.