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]))
|
(:require [mranderson047.re-frame.v0v10v2.re-frame.core :as rf]))
|
||||||
|
|
||||||
(rf/reg-sub
|
(rf/reg-sub
|
||||||
:settings/panel-width%
|
:settings/root
|
||||||
(fn [db _]
|
(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
|
(rf/reg-sub
|
||||||
:settings/show-panel?
|
:settings/show-panel?
|
||||||
(fn [db _]
|
:<- [:settings/root]
|
||||||
(get-in db [:settings :show-panel?])))
|
(fn [settings _]
|
||||||
|
(get settings :show-panel?)))
|
||||||
|
|
||||||
(rf/reg-sub
|
(rf/reg-sub
|
||||||
:settings/selected-tab
|
:settings/selected-tab
|
||||||
|
:<- [:settings/root]
|
||||||
|
(fn [settings _]
|
||||||
|
(get settings :selected-tab)))
|
||||||
|
|
||||||
|
(rf/reg-sub
|
||||||
|
:app-db/root
|
||||||
(fn [db _]
|
(fn [db _]
|
||||||
(get-in db [:settings :selected-tab])))
|
(get db :app-db)))
|
||||||
|
|
||||||
(rf/reg-sub
|
(rf/reg-sub
|
||||||
:app-db/paths
|
:app-db/paths
|
||||||
(fn [db _]
|
:<- [:app-db/root]
|
||||||
(get-in db [:app-db :paths])))
|
(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
|
(rf/reg-sub
|
||||||
:traces/filter-items
|
:traces/filter-items
|
||||||
|
|
Loading…
Reference in New Issue