changed to GFYCat-style naming convention

Former-commit-id: 8d43dbf6ca
This commit is contained in:
Adrian Tiberius 2016-10-14 15:45:41 +03:00
parent 4c33c34ee9
commit 18f91f79ba
8 changed files with 19 additions and 13 deletions

View File

@ -26,6 +26,7 @@
[status-im.chat.handlers.commands :refer [command-prefix]]
[status-im.chat.utils :refer [console? not-console?]]
[status-im.constants :refer [console-chat-id]]
[status-im.utils.gfycat.core :refer [generate-gfy]]
status-im.chat.handlers.animation
status-im.chat.handlers.requests
status-im.chat.handlers.unviewed-messages
@ -284,15 +285,15 @@
init-chat))))
(defn prepare-chat
[{:keys [contacts] :as db} [_ contcat-id options]]
(let [name (get-in contacts [contcat-id :name])
chat (merge {:chat-id contcat-id
:name (or name contcat-id)
[{:keys [contacts] :as db} [_ contact-id options]]
(let [name (get-in contacts [contact-id :name])
chat (merge {:chat-id contact-id
:name (or name (generate-gfy))
:color default-chat-color
:group-chat false
:is-active true
:timestamp (.getTime (js/Date.))
:contacts [{:identity contcat-id}]
:contacts [{:identity contact-id}]
:dapp-url nil
:dapp-hash nil}
options)]

View File

@ -25,6 +25,7 @@
content-type-command
content-type-command-request]]
[status-im.utils.identicon :refer [identicon]]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.i18n :refer [label]]
[status-im.chat.utils :as cu]
[clojure.string :as str]))
@ -66,7 +67,7 @@
:font :default
:number-of-lines 1}
(if (str/blank? @name)
(label :t/user-anonymous)
(generate-gfy)
(or @name (label :t/chat-name)))]
(when (or status content)
[text {:style st/status-text

View File

@ -10,6 +10,7 @@
[status-im.components.refreshable-text.view :refer [refreshable-text]]
[status-im.utils.datetime :as time]
[status-im.utils.platform :refer [platform-specific]]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.constants :refer [console-chat-id]]))
(defn online-text [contact chat-id]
@ -58,7 +59,7 @@
:number-of-lines 1
:font :toolbar-title}
(if (str/blank? @name)
(label :t/user-anonymous)
(generate-gfy)
(or @name (label :t/chat-name)))]
(if @group-chat
[group-last-activity {:contacts @contacts

View File

@ -6,6 +6,7 @@
[status-im.utils.utils :refer [truncate-str]]
[status-im.i18n :refer [label label-pluralize]]
[status-im.utils.datetime :as time]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.constants :refer [console-chat-id]]
[clojure.string :as str]))
@ -54,7 +55,7 @@
online group-chat contacts] :as chat}]
(let [last-message (or (first (:messages chat))
last-message)
name (or name chat-id)]
name (or name (generate-gfy))]
[view st/chat-container
[view st/chat-icon-container
[chat-icon-view-chat-list chat-id group-chat name color online]]
@ -63,7 +64,7 @@
[text {:style st/name-text
:font :medium}
(if (str/blank? name)
(label :t/user-anonymous)
(generate-gfy)
(truncate-str name 30))]
(when group-chat
[icon :group st/group-icon])

View File

@ -15,6 +15,7 @@
[status-im.components.drawer.styles :as st]
[status-im.profile.validations :as v]
[status-im.resources :as res]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.i18n :refer [label]]
[status-im.components.react :refer [dismiss-keyboard!]]))
@ -55,7 +56,7 @@
[text-field
{:line-color :white
:focus-line-color :white
:placeholder (label :t/user-anonymous)
:placeholder (generate-gfy)
:editable true
:input-style (st/name-input-text (s/valid? ::v/name (or new-name name)))
:wrapper-style st/name-input-wrapper

View File

@ -3,6 +3,7 @@
[status-im.components.react :refer [view image text]]
[status-im.components.chat-icon.screen :refer [contact-icon-contacts-tab]]
[status-im.contacts.styles :as st]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.i18n :refer [label]]))
(defn contact-photo [contact]
@ -21,7 +22,7 @@
(if (pos? (count (:name contact)))
name
;; todo is this correct behaviour?
(label :t/user-anonymous))]
(generate-gfy))]
(when info
[text {:style st/info-text}
info])]]))

View File

@ -4,6 +4,7 @@
[clojure.string :as str]
[status-im.components.react :refer [view text image]]
[status-im.discovery.styles :as st]
[status-im.utils.gfycat.core :refer [generate-gfy]]
[status-im.utils.identicon :refer [identicon]]
[status-im.i18n :refer [label]]))
@ -18,7 +19,7 @@
(cond
(not (str/blank? contact-name)) contact-name
(not (str/blank? name)) name
:else (label :t/user-anonymous))]
:else (generate-gfy))]
[text {:style st/popular-list-item-status
:font :default
:number-of-lines 2}

View File

@ -61,7 +61,6 @@
:report-user "REPORT USER"
:message "Message"
:username "Username"
:user-anonymous "Anonymous"
:not-specified "Not specified"
:public-key "Public Key"
:phone-number "Phone number"