changed to GFYCat-style naming convention
This commit is contained in:
parent
3be8f8881d
commit
8d43dbf6ca
|
@ -26,6 +26,7 @@
|
||||||
[status-im.chat.handlers.commands :refer [command-prefix]]
|
[status-im.chat.handlers.commands :refer [command-prefix]]
|
||||||
[status-im.chat.utils :refer [console? not-console?]]
|
[status-im.chat.utils :refer [console? not-console?]]
|
||||||
[status-im.constants :refer [console-chat-id]]
|
[status-im.constants :refer [console-chat-id]]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
status-im.chat.handlers.animation
|
status-im.chat.handlers.animation
|
||||||
status-im.chat.handlers.requests
|
status-im.chat.handlers.requests
|
||||||
status-im.chat.handlers.unviewed-messages
|
status-im.chat.handlers.unviewed-messages
|
||||||
|
@ -284,15 +285,15 @@
|
||||||
init-chat))))
|
init-chat))))
|
||||||
|
|
||||||
(defn prepare-chat
|
(defn prepare-chat
|
||||||
[{:keys [contacts] :as db} [_ contcat-id options]]
|
[{:keys [contacts] :as db} [_ contact-id options]]
|
||||||
(let [name (get-in contacts [contcat-id :name])
|
(let [name (get-in contacts [contact-id :name])
|
||||||
chat (merge {:chat-id contcat-id
|
chat (merge {:chat-id contact-id
|
||||||
:name (or name contcat-id)
|
:name (or name (generate-gfy))
|
||||||
:color default-chat-color
|
:color default-chat-color
|
||||||
:group-chat false
|
:group-chat false
|
||||||
:is-active true
|
:is-active true
|
||||||
:timestamp (.getTime (js/Date.))
|
:timestamp (.getTime (js/Date.))
|
||||||
:contacts [{:identity contcat-id}]
|
:contacts [{:identity contact-id}]
|
||||||
:dapp-url nil
|
:dapp-url nil
|
||||||
:dapp-hash nil}
|
:dapp-hash nil}
|
||||||
options)]
|
options)]
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
content-type-command
|
content-type-command
|
||||||
content-type-command-request]]
|
content-type-command-request]]
|
||||||
[status-im.utils.identicon :refer [identicon]]
|
[status-im.utils.identicon :refer [identicon]]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
[status-im.i18n :refer [label]]
|
[status-im.i18n :refer [label]]
|
||||||
[status-im.chat.utils :as cu]
|
[status-im.chat.utils :as cu]
|
||||||
[clojure.string :as str]))
|
[clojure.string :as str]))
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
:font :default
|
:font :default
|
||||||
:number-of-lines 1}
|
:number-of-lines 1}
|
||||||
(if (str/blank? @name)
|
(if (str/blank? @name)
|
||||||
(label :t/user-anonymous)
|
(generate-gfy)
|
||||||
(or @name (label :t/chat-name)))]
|
(or @name (label :t/chat-name)))]
|
||||||
(when (or status content)
|
(when (or status content)
|
||||||
[text {:style st/status-text
|
[text {:style st/status-text
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
[status-im.components.refreshable-text.view :refer [refreshable-text]]
|
[status-im.components.refreshable-text.view :refer [refreshable-text]]
|
||||||
[status-im.utils.datetime :as time]
|
[status-im.utils.datetime :as time]
|
||||||
[status-im.utils.platform :refer [platform-specific]]
|
[status-im.utils.platform :refer [platform-specific]]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
[status-im.constants :refer [console-chat-id]]))
|
[status-im.constants :refer [console-chat-id]]))
|
||||||
|
|
||||||
(defn online-text [contact chat-id]
|
(defn online-text [contact chat-id]
|
||||||
|
@ -58,7 +59,7 @@
|
||||||
:number-of-lines 1
|
:number-of-lines 1
|
||||||
:font :toolbar-title}
|
:font :toolbar-title}
|
||||||
(if (str/blank? @name)
|
(if (str/blank? @name)
|
||||||
(label :t/user-anonymous)
|
(generate-gfy)
|
||||||
(or @name (label :t/chat-name)))]
|
(or @name (label :t/chat-name)))]
|
||||||
(if @group-chat
|
(if @group-chat
|
||||||
[group-last-activity {:contacts @contacts
|
[group-last-activity {:contacts @contacts
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
[status-im.utils.utils :refer [truncate-str]]
|
[status-im.utils.utils :refer [truncate-str]]
|
||||||
[status-im.i18n :refer [label label-pluralize]]
|
[status-im.i18n :refer [label label-pluralize]]
|
||||||
[status-im.utils.datetime :as time]
|
[status-im.utils.datetime :as time]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
[status-im.constants :refer [console-chat-id]]
|
[status-im.constants :refer [console-chat-id]]
|
||||||
[clojure.string :as str]))
|
[clojure.string :as str]))
|
||||||
|
|
||||||
|
@ -54,7 +55,7 @@
|
||||||
online group-chat contacts] :as chat}]
|
online group-chat contacts] :as chat}]
|
||||||
(let [last-message (or (first (:messages chat))
|
(let [last-message (or (first (:messages chat))
|
||||||
last-message)
|
last-message)
|
||||||
name (or name chat-id)]
|
name (or name (generate-gfy))]
|
||||||
[view st/chat-container
|
[view st/chat-container
|
||||||
[view st/chat-icon-container
|
[view st/chat-icon-container
|
||||||
[chat-icon-view-chat-list chat-id group-chat name color online]]
|
[chat-icon-view-chat-list chat-id group-chat name color online]]
|
||||||
|
@ -63,7 +64,7 @@
|
||||||
[text {:style st/name-text
|
[text {:style st/name-text
|
||||||
:font :medium}
|
:font :medium}
|
||||||
(if (str/blank? name)
|
(if (str/blank? name)
|
||||||
(label :t/user-anonymous)
|
(generate-gfy)
|
||||||
(truncate-str name 30))]
|
(truncate-str name 30))]
|
||||||
(when group-chat
|
(when group-chat
|
||||||
[icon :group st/group-icon])
|
[icon :group st/group-icon])
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
[status-im.components.drawer.styles :as st]
|
[status-im.components.drawer.styles :as st]
|
||||||
[status-im.profile.validations :as v]
|
[status-im.profile.validations :as v]
|
||||||
[status-im.resources :as res]
|
[status-im.resources :as res]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
[status-im.i18n :refer [label]]
|
[status-im.i18n :refer [label]]
|
||||||
[status-im.components.react :refer [dismiss-keyboard!]]))
|
[status-im.components.react :refer [dismiss-keyboard!]]))
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@
|
||||||
[text-field
|
[text-field
|
||||||
{:line-color :white
|
{:line-color :white
|
||||||
:focus-line-color :white
|
:focus-line-color :white
|
||||||
:placeholder (label :t/user-anonymous)
|
:placeholder (generate-gfy)
|
||||||
:editable true
|
:editable true
|
||||||
:input-style (st/name-input-text (s/valid? ::v/name (or new-name name)))
|
:input-style (st/name-input-text (s/valid? ::v/name (or new-name name)))
|
||||||
:wrapper-style st/name-input-wrapper
|
:wrapper-style st/name-input-wrapper
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
[status-im.components.react :refer [view image text]]
|
[status-im.components.react :refer [view image text]]
|
||||||
[status-im.components.chat-icon.screen :refer [contact-icon-contacts-tab]]
|
[status-im.components.chat-icon.screen :refer [contact-icon-contacts-tab]]
|
||||||
[status-im.contacts.styles :as st]
|
[status-im.contacts.styles :as st]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
[status-im.i18n :refer [label]]))
|
[status-im.i18n :refer [label]]))
|
||||||
|
|
||||||
(defn contact-photo [contact]
|
(defn contact-photo [contact]
|
||||||
|
@ -21,7 +22,7 @@
|
||||||
(if (pos? (count (:name contact)))
|
(if (pos? (count (:name contact)))
|
||||||
name
|
name
|
||||||
;; todo is this correct behaviour?
|
;; todo is this correct behaviour?
|
||||||
(label :t/user-anonymous))]
|
(generate-gfy))]
|
||||||
(when info
|
(when info
|
||||||
[text {:style st/info-text}
|
[text {:style st/info-text}
|
||||||
info])]]))
|
info])]]))
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[status-im.components.react :refer [view text image]]
|
[status-im.components.react :refer [view text image]]
|
||||||
[status-im.discovery.styles :as st]
|
[status-im.discovery.styles :as st]
|
||||||
|
[status-im.utils.gfycat.core :refer [generate-gfy]]
|
||||||
[status-im.utils.identicon :refer [identicon]]
|
[status-im.utils.identicon :refer [identicon]]
|
||||||
[status-im.i18n :refer [label]]))
|
[status-im.i18n :refer [label]]))
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@
|
||||||
(cond
|
(cond
|
||||||
(not (str/blank? contact-name)) contact-name
|
(not (str/blank? contact-name)) contact-name
|
||||||
(not (str/blank? name)) name
|
(not (str/blank? name)) name
|
||||||
:else (label :t/user-anonymous))]
|
:else (generate-gfy))]
|
||||||
[text {:style st/popular-list-item-status
|
[text {:style st/popular-list-item-status
|
||||||
:font :default
|
:font :default
|
||||||
:number-of-lines 2}
|
:number-of-lines 2}
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
:report-user "REPORT USER"
|
:report-user "REPORT USER"
|
||||||
:message "Message"
|
:message "Message"
|
||||||
:username "Username"
|
:username "Username"
|
||||||
:user-anonymous "Anonymous"
|
|
||||||
:not-specified "Not specified"
|
:not-specified "Not specified"
|
||||||
:public-key "Public Key"
|
:public-key "Public Key"
|
||||||
:phone-number "Phone number"
|
:phone-number "Phone number"
|
||||||
|
|
Loading…
Reference in New Issue