2016-05-19 18:31:56 +02:00
|
|
|
(ns status-im.db
|
2016-10-26 18:30:31 +03:00
|
|
|
(:require [status-im.components.react :refer [animated]]
|
2016-09-23 16:22:35 +03:00
|
|
|
[status-im.components.animation :as anim]
|
|
|
|
[status-im.constants :refer [console-chat-id]]))
|
2016-03-23 16:48:26 +02:00
|
|
|
|
|
|
|
;; initial state of app-db
|
2016-05-19 19:29:17 +03:00
|
|
|
(def app-db {:identity-password "replace-me-with-user-entered-password"
|
|
|
|
:identity "me"
|
2016-09-04 18:39:05 +03:00
|
|
|
:current-public-key "me"
|
2016-08-01 13:29:10 +03:00
|
|
|
|
2016-06-30 18:06:05 +03:00
|
|
|
:accounts {}
|
2016-08-01 13:29:10 +03:00
|
|
|
:current-account-id nil
|
|
|
|
|
|
|
|
:profile-edit {:edit? false
|
|
|
|
:name nil
|
|
|
|
:email nil
|
|
|
|
:status nil
|
|
|
|
:photo-path nil}
|
|
|
|
|
2016-08-04 18:36:13 +03:00
|
|
|
:new-contact-identity ""
|
|
|
|
:contacts {}
|
2016-08-19 16:14:59 +03:00
|
|
|
:discoveries []
|
|
|
|
:discovery-search-tags []
|
|
|
|
:tags {}
|
2016-08-04 18:36:13 +03:00
|
|
|
|
2016-08-24 10:29:40 +03:00
|
|
|
:chats {}
|
2016-05-19 19:29:17 +03:00
|
|
|
:chat {:command nil
|
|
|
|
:last-message nil}
|
2016-09-23 16:22:35 +03:00
|
|
|
:current-chat-id console-chat-id
|
2016-08-24 10:29:40 +03:00
|
|
|
|
|
|
|
:contacts-ids #{}
|
|
|
|
:selected-contacts #{}
|
2016-05-19 19:29:17 +03:00
|
|
|
:chats-updated-signal 0
|
2016-09-16 14:36:31 +03:00
|
|
|
:chat-ui-props {:show-actions? false
|
|
|
|
:show-bottom-info? false}
|
2016-05-21 15:23:24 +03:00
|
|
|
:selected-participants #{}
|
2016-10-17 14:51:33 +03:00
|
|
|
:view-id nil
|
|
|
|
:navigation-stack '()
|
2016-05-19 19:29:17 +03:00
|
|
|
:current-tag nil
|
2016-06-02 17:39:26 +03:00
|
|
|
:qr-codes {}
|
2016-07-22 11:53:12 +03:00
|
|
|
:keyboard-height 0
|
2016-07-08 18:30:16 +03:00
|
|
|
:animations {;; todo clear this
|
2016-06-30 19:00:44 +03:00
|
|
|
:tabs-bar-value (anim/create-value 0)}
|
2016-10-06 12:52:58 +03:00
|
|
|
:loading-allowed true
|
|
|
|
|
|
|
|
:sync-state :done
|
|
|
|
:sync-listener nil})
|
2016-03-23 21:05:42 +02:00
|
|
|
|
2016-04-21 12:26:05 +03:00
|
|
|
(defn chat-staged-commands-path [chat-id]
|
|
|
|
[:chats chat-id :staged-commands])
|
2016-04-05 17:00:49 +03:00
|
|
|
(defn chat-command-path [chat-id]
|
|
|
|
[:chats chat-id :command-input :command])
|
2016-08-24 10:29:40 +03:00
|
|
|
(defn chat-command-to-message-id-path [chat-id]
|
|
|
|
[:chats chat-id :command-input :to-message-id])
|
2016-04-05 17:00:49 +03:00
|
|
|
(defn chat-command-content-path [chat-id]
|
|
|
|
[:chats chat-id :command-input :content])
|
2016-04-08 20:08:40 +03:00
|
|
|
(defn chat-command-requests-path [chat-id]
|
|
|
|
[:chats chat-id :command-requests])
|
2016-08-24 10:29:40 +03:00
|
|
|
(defn chat-command-request-path [chat-id message-id]
|
|
|
|
[:chats chat-id :command-requests message-id])
|