virvar 9ec0d03d90 Animation refactoring
Former-commit-id: 4413d8dc3bb0101e583beacbd89e57d223ad2d5a
2016-06-10 12:09:19 +03:00

22 lines
579 B
Clojure

(ns status-im.subs
(:require-macros [reagent.ratom :refer [reaction]])
(:require [re-frame.core :refer [register-sub]]
status-im.chat.subs
status-im.group-settings.subs
status-im.discovery.subs
status-im.contacts.subs
status-im.new-group.subs
status-im.participants.subs))
(register-sub :get
(fn [db [_ k]]
(reaction (k @db))))
(register-sub :get-in
(fn [db [_ path]]
(reaction (get-in @db path))))
(register-sub :animations
(fn [db [_ k]]
(reaction (get-in @db [:animations k]))))