Extract out subscriptions
This commit is contained in:
parent
1c456acaae
commit
dabd165295
|
@ -2,24 +2,44 @@
|
|||
(:require [mranderson047.re-frame.v0v10v2.re-frame.core :as rf]))
|
||||
|
||||
(rf/reg-sub
|
||||
:settings/panel-width%
|
||||
:settings/root
|
||||
(fn [db _]
|
||||
(get-in db [:settings :panel-width%])))
|
||||
(get db :settings)))
|
||||
|
||||
(rf/reg-sub
|
||||
:settings/panel-width%
|
||||
:<- [:settings/root]
|
||||
(fn [settings _]
|
||||
(get settings :panel-width%)))
|
||||
|
||||
(rf/reg-sub
|
||||
:settings/show-panel?
|
||||
(fn [db _]
|
||||
(get-in db [:settings :show-panel?])))
|
||||
:<- [:settings/root]
|
||||
(fn [settings _]
|
||||
(get settings :show-panel?)))
|
||||
|
||||
(rf/reg-sub
|
||||
:settings/selected-tab
|
||||
:<- [:settings/root]
|
||||
(fn [settings _]
|
||||
(get settings :selected-tab)))
|
||||
|
||||
(rf/reg-sub
|
||||
:app-db/root
|
||||
(fn [db _]
|
||||
(get-in db [:settings :selected-tab])))
|
||||
(get db :app-db)))
|
||||
|
||||
(rf/reg-sub
|
||||
:app-db/paths
|
||||
(fn [db _]
|
||||
(get-in db [:app-db :paths])))
|
||||
:<- [:app-db/root]
|
||||
(fn [app-db-settings _]
|
||||
(get app-db-settings :paths)))
|
||||
|
||||
(rf/reg-sub
|
||||
:app-db/search-string
|
||||
:<- [:app-db/root]
|
||||
(fn [app-db-settings _]
|
||||
(get app-db-settings :search-string)))
|
||||
|
||||
(rf/reg-sub
|
||||
:traces/filter-items
|
||||
|
|
Loading…
Reference in New Issue