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]
|
2016-11-09 12:40:17 +02:00
|
|
|
[status-im.constants :refer [console-chat-id]]
|
|
|
|
[status-im.utils.platform :as p]))
|
2016-03-23 16:48:26 +02:00
|
|
|
|
|
|
|
;; initial state of app-db
|
2016-10-30 00:35:37 +03:00
|
|
|
(def app-db {:identity-password "replace-me-with-user-entered-password"
|
|
|
|
:identity "me"
|
|
|
|
:current-public-key "me"
|
|
|
|
|
|
|
|
:accounts {}
|
|
|
|
:current-account-id nil
|
|
|
|
|
|
|
|
:profile-edit {:edit? false
|
|
|
|
:name nil
|
|
|
|
:email nil
|
|
|
|
:status nil
|
|
|
|
:photo-path nil}
|
|
|
|
|
|
|
|
:new-contact-identity ""
|
|
|
|
:contacts {}
|
2016-11-10 15:34:25 +03:00
|
|
|
:discoveries {}
|
2017-01-22 17:05:15 +02:00
|
|
|
:discover-search-tags []
|
2016-10-30 00:35:37 +03:00
|
|
|
:tags {}
|
|
|
|
|
|
|
|
:chats {}
|
|
|
|
:chat {:command nil
|
|
|
|
:last-message nil}
|
|
|
|
:current-chat-id console-chat-id
|
|
|
|
|
|
|
|
:contacts-ids #{}
|
|
|
|
:selected-contacts #{}
|
|
|
|
:chats-updated-signal 0
|
|
|
|
:chat-ui-props {:show-actions? false
|
|
|
|
:show-bottom-info? false}
|
|
|
|
:selected-participants #{}
|
|
|
|
:view-id nil
|
|
|
|
:navigation-stack '()
|
|
|
|
:current-tag nil
|
|
|
|
:qr-codes {}
|
|
|
|
:keyboard-height 0
|
|
|
|
:animations {;; todo clear this
|
|
|
|
:tabs-bar-value (anim/create-value 0)}
|
|
|
|
:loading-allowed true
|
|
|
|
|
|
|
|
:sync-state :done
|
2017-01-22 17:05:15 +02:00
|
|
|
:sync-listening-started nil
|
2016-11-09 12:40:17 +02:00
|
|
|
:status-module-initialized? (or p/ios? js/goog.DEBUG)
|
|
|
|
:edit-mode {}
|
|
|
|
:network :testnet})
|
2016-03-23 21:05:42 +02:00
|
|
|
|
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-08-24 10:29:40 +03:00
|
|
|
(defn chat-command-request-path [chat-id message-id]
|
|
|
|
[:chats chat-id :command-requests message-id])
|