[#10732] Remove message spinners and 'Sent' status

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
Andrey Shovkoplyas 2020-06-02 13:40:09 +02:00
parent d50f6ca21e
commit 0620f4b0df
No known key found for this signature in database
GPG Key ID: EAAB7C8622D860A4
1 changed files with 4 additions and 15 deletions

View File

@ -202,11 +202,6 @@
(:text content)]] (:text content)]]
[message-timestamp message]]])) [message-timestamp message]]]))
(defn message-activity-indicator
[]
[react/view style/message-activity-indicator
[react/activity-indicator {:animating true}]])
(defn message-not-sent-text (defn message-not-sent-text
[chat-id message-id] [chat-id message-id]
[react/touchable-highlight [react/touchable-highlight
@ -226,16 +221,10 @@
[vector-icons/icon :main-icons/warning {:color colors/red}]]]]) [vector-icons/icon :main-icons/warning {:color colors/red}]]]])
(defn message-delivery-status (defn message-delivery-status
[{:keys [chat-id message-id outgoing-status [{:keys [chat-id message-id outgoing-status message-type]}]
first-outgoing? message-type]}] (when (and (not= constants/message-type-private-group-system-message message-type)
(when (not= constants/message-type-private-group-system-message message-type) (= outgoing-status :not-sent))
(case outgoing-status [message-not-sent-text chat-id message-id]))
:sending [message-activity-indicator]
:not-sent [message-not-sent-text chat-id message-id]
:sent (when first-outgoing?
[react/text {:style style/delivery-text}
(i18n/label :t/status-sent)])
nil)))
(defview message-author-name [from alias] (defview message-author-name [from alias]
(letsubs [contact-name [:contacts/raw-contact-name-by-identity from]] (letsubs [contact-name [:contacts/raw-contact-name-by-identity from]]