Fix setting categories when reloading

This commit is contained in:
Daniel Compton 2017-12-20 15:16:40 +13:00
parent 227cd8b451
commit 45809dddad
2 changed files with 7 additions and 1 deletions

View File

@ -20,7 +20,7 @@
(when external-window?
(rf/dispatch [:global/launch-external]))
(rf/dispatch [:traces/filter-items filter-items])
(rf/dispatch [:traces/toggle-categories categories])
(rf/dispatch [:traces/set-categories categories])
(rf/dispatch [:app-db/paths app-db-paths])
(rf/dispatch [:app-db/set-json-ml-paths json-ml-paths])
(rf/dispatch [:global/add-unload-hook])))

View File

@ -224,6 +224,12 @@
(localstorage/save! "categories" new-categories)
new-categories)))
(rf/reg-event-db
:traces/set-categories
[(rf/path [:traces :categories])]
(fn [categories [_ new-categories]]
new-categories))
;; App DB
(rf/reg-event-db