mirror of
https://github.com/status-im/status-react.git
synced 2025-01-17 22:42:16 +00:00
1b480a1a58
* ability to edit profile data * ability to update status (we save it internally for now) * ability to change profile picture (from camera or gallery) * enhanced way of storing profile-related data in realm and internal state db Former-commit-id: 91d8ecc4bdf8407bc95b2fe703113bebccbbd885
27 lines
762 B
Clojure
27 lines
762 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-current-account
|
|
(fn [db [_ _]]
|
|
(reaction (let [current-account-id (:current-account-id @db)]
|
|
(get-in @db [:accounts current-account-id])))))
|
|
|
|
(register-sub :get-in
|
|
(fn [db [_ path]]
|
|
(reaction (get-in @db path))))
|
|
|
|
(register-sub :animations
|
|
(fn [db [_ k]]
|
|
(reaction (get-in @db [:animations k]))))
|