mirror of
https://github.com/status-im/status-react.git
synced 2025-01-30 20:55:03 +00:00
7d2371afec
Conflicts: src/status_im/android/core.cljs src/status_im/chat/handlers.cljs src/status_im/group_settings/handlers.cljs src/status_im/group_settings/screen.cljs src/status_im/group_settings/styles/chat_name_edit.cljs src/status_im/group_settings/subs.cljs src/status_im/group_settings/views/chat_name_edit.cljs src/status_im/handlers.cljs src/status_im/navigation.cljs src/status_im/participants/views/contact.cljs src/status_im/participants/views/create.cljs src/status_im/participants/views/remove.cljs src/syng_im/subs.cljs Former-commit-id: 277905124dc9fe2bd4ea6362dd1365dca567ae38
48 lines
1.8 KiB
Clojure
48 lines
1.8 KiB
Clojure
(ns status-im.db
|
|
(:require [schema.core :as s :include-macros true]))
|
|
|
|
;; schema of app-db
|
|
(def schema {:greeting s/Str})
|
|
|
|
(def default-view :chat-list)
|
|
|
|
;; initial state of app-db
|
|
(def app-db {:identity-password "replace-me-with-user-entered-password"
|
|
:identity "me"
|
|
:contacts []
|
|
:contacts-ids #{}
|
|
:selected-contacts #{}
|
|
:current-chat-id "console"
|
|
:chat {:command nil
|
|
:last-message nil}
|
|
:chats {}
|
|
:chats-updated-signal 0
|
|
:show-actions false
|
|
:selected-participants #{}
|
|
:signed-up true
|
|
:view-id default-view
|
|
:navigation-stack (list default-view)
|
|
;; TODO fix hardcoded values
|
|
:username "My Name"
|
|
:phone-number "3147984309"
|
|
:email "myemail@gmail.com"
|
|
:status "Hi, this is my status"
|
|
:current-tag nil
|
|
:disable-group-creation false})
|
|
|
|
(def protocol-initialized-path [:protocol-initialized])
|
|
(defn chat-input-text-path [chat-id]
|
|
[:chats chat-id :input-text])
|
|
(defn chat-staged-commands-path [chat-id]
|
|
[:chats chat-id :staged-commands])
|
|
(defn chat-command-path [chat-id]
|
|
[:chats chat-id :command-input :command])
|
|
(defn chat-command-to-msg-id-path [chat-id]
|
|
[:chats chat-id :command-input :to-msg-id])
|
|
(defn chat-command-content-path [chat-id]
|
|
[:chats chat-id :command-input :content])
|
|
(defn chat-command-requests-path [chat-id]
|
|
[:chats chat-id :command-requests])
|
|
(defn chat-command-request-path [chat-id msg-id]
|
|
[:chats chat-id :command-requests msg-id])
|