Remove contact indicator from userpic
Add contact indicator in 1:1 as a text. Fixes #9826 Fix e2e explicitly define line height On android and iOs line height is different, explicitly define so it will be the same in both platforms. Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
This commit is contained in:
parent
b2feca723c
commit
47732e7b5b
|
@ -36,20 +36,12 @@
|
|||
[react/view online-dot-left]
|
||||
[react/view online-dot-right]]]])
|
||||
|
||||
(defn pending-contact-badge
|
||||
[{:keys [pending-wrapper pending-outer-circle pending-inner-circle]}]
|
||||
[react/view pending-wrapper
|
||||
[react/view pending-outer-circle
|
||||
[react/view pending-inner-circle]]])
|
||||
|
||||
(defn chat-icon-view
|
||||
[{:keys [photo-path added?] :as contact} group-chat name _online styles & [hide-dapp?]]
|
||||
[contact group-chat name _online styles]
|
||||
[react/view (:container styles)
|
||||
(if-not group-chat
|
||||
[photos/photo (multiaccounts/displayed-photo contact) styles]
|
||||
[default-chat-icon name styles])
|
||||
(when (and contact (not added?))
|
||||
[pending-contact-badge styles])])
|
||||
[default-chat-icon name styles])])
|
||||
|
||||
(defn chat-icon-view-toolbar
|
||||
[contact group-chat name color online]
|
||||
|
@ -59,30 +51,23 @@
|
|||
:online-view styles/online-view
|
||||
:online-dot-left styles/online-dot-left
|
||||
:online-dot-right styles/online-dot-right
|
||||
:pending-wrapper styles/pending-wrapper
|
||||
:pending-outer-circle styles/pending-outer-circle
|
||||
:pending-inner-circle styles/pending-inner-circle
|
||||
:size 36
|
||||
:chat-icon styles/chat-icon-chat-toolbar
|
||||
:default-chat-icon (styles/default-chat-icon-chat-toolbar color)
|
||||
:default-chat-icon-text styles/default-chat-icon-text}])
|
||||
|
||||
(defn chat-icon-view-chat-list
|
||||
[contact group-chat name color online & [hide-dapp?]]
|
||||
[contact group-chat name color online]
|
||||
[chat-icon-view contact group-chat name online
|
||||
{:container styles/container-chat-list
|
||||
:online-view-wrapper styles/online-view-wrapper
|
||||
:online-view styles/online-view
|
||||
:online-dot-left styles/online-dot-left
|
||||
:online-dot-right styles/online-dot-right
|
||||
:pending-wrapper styles/pending-wrapper
|
||||
:pending-outer-circle styles/pending-outer-circle
|
||||
:pending-inner-circle styles/pending-inner-circle
|
||||
:size 40
|
||||
:chat-icon styles/chat-icon-chat-list
|
||||
:default-chat-icon (styles/default-chat-icon-chat-list color)
|
||||
:default-chat-icon-text styles/default-chat-icon-text}
|
||||
hide-dapp?])
|
||||
:default-chat-icon-text styles/default-chat-icon-text}])
|
||||
|
||||
(defn custom-icon-view-list
|
||||
[name color & [size]]
|
||||
|
|
|
@ -214,42 +214,6 @@
|
|||
:height image-size
|
||||
:border-radius (/ image-size 2)}))
|
||||
|
||||
(def pending-wrapper
|
||||
{:position :absolute
|
||||
:bottom 0
|
||||
:right 0
|
||||
:width 12
|
||||
:height 12
|
||||
:border-radius 6
|
||||
:background-color :white
|
||||
:align-items :center
|
||||
:justify-content :center})
|
||||
|
||||
(def pending-view-menu-wrapper
|
||||
{:position :absolute
|
||||
:bottom 2
|
||||
:right 2
|
||||
:width 12
|
||||
:height 12
|
||||
:border-radius 6
|
||||
:background-color :white
|
||||
:align-items :center
|
||||
:justify-content :center})
|
||||
|
||||
(def pending-outer-circle
|
||||
{:background-color colors/blue
|
||||
:width 8
|
||||
:height 8
|
||||
:border-radius 4
|
||||
:align-items :center
|
||||
:justify-content :center})
|
||||
|
||||
(def pending-inner-circle
|
||||
{:background-color :white
|
||||
:width 4
|
||||
:height 4
|
||||
:border-radius 2})
|
||||
|
||||
(defn profile-icon-mask [size]
|
||||
{:height size
|
||||
:width size
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
(def toolbar-container
|
||||
{:flex 1
|
||||
:align-items :center
|
||||
:flex-direction :row})
|
||||
|
||||
(def messages-container
|
||||
|
@ -39,8 +40,9 @@
|
|||
:justify-content :center})
|
||||
|
||||
(def chat-name-text
|
||||
{:typography :main-medium
|
||||
:margin-top -3})
|
||||
{:typography :main-medium
|
||||
:font-size 15
|
||||
:line-height 22})
|
||||
|
||||
(def group-icon
|
||||
{:margin-top 4
|
||||
|
@ -50,6 +52,7 @@
|
|||
|
||||
(def toolbar-subtitle
|
||||
{:typography :caption
|
||||
:line-height 16
|
||||
:color colors/text-gray})
|
||||
|
||||
(def last-activity-text
|
||||
|
|
|
@ -39,19 +39,28 @@
|
|||
(i18n/label :members-active-none)
|
||||
(i18n/label-pluralize cnt :t/members-active))))]]))
|
||||
|
||||
(defn- contact-indicator [{:keys [added?]}]
|
||||
[react/view {:flex-direction :row}
|
||||
[react/text {:style st/toolbar-subtitle}
|
||||
(if added?
|
||||
(i18n/label :chat-is-a-contact)
|
||||
(i18n/label :chat-is-not-a-contact))]])
|
||||
|
||||
(defview toolbar-content-view []
|
||||
(letsubs [{:keys [group-chat color online contacts chat-name contact
|
||||
public? chat-id] :as chat} [:chats/current-chat]
|
||||
sync-state [:sync-state]]
|
||||
(let [has-subtitle? (or group-chat (not= :done sync-state))]
|
||||
[react/view {:style st/toolbar-container}
|
||||
[react/view {:margin-right 8}
|
||||
[react/view {:margin-right 10}
|
||||
[chat-icon.screen/chat-icon-view-toolbar contact group-chat chat-name color online]]
|
||||
[react/view {:style st/chat-name-view}
|
||||
[react/text {:style st/chat-name-text
|
||||
:number-of-lines 1
|
||||
:accessibility-label :chat-name-text}
|
||||
chat-name]
|
||||
(when contact
|
||||
[contact-indicator contact])
|
||||
(if group-chat
|
||||
[group-last-activity {:contacts contacts
|
||||
:public? public?
|
||||
|
|
|
@ -113,7 +113,7 @@ class ChatElement(BaseButton):
|
|||
# TODO: commented until accessibility-id will be added back
|
||||
# locator_str = "//*[@content-desc='unread-messages-count-text']"
|
||||
# self.locator = self.Locator.xpath_selector(parent_locator + locator_str)
|
||||
locator_str = "/android.view.ViewGroup[3]//android.widget.TextView"
|
||||
locator_str = "/android.view.ViewGroup[2]//android.widget.TextView"
|
||||
self.locator = self.Locator.xpath_selector(parent_locator + locator_str)
|
||||
|
||||
|
||||
|
|
|
@ -671,6 +671,8 @@
|
|||
"message-reply": "Reply",
|
||||
"message-syncing": "Message syncing",
|
||||
"messages": "Messages",
|
||||
"chat-is-a-contact": "Contact",
|
||||
"chat-is-not-a-contact": "Not a contact",
|
||||
"might-break": "Might break some ÐApps",
|
||||
"migrations-erase-multiaccounts-data-button": "Erase multiaccount's db",
|
||||
"migrations-failed-content": "{{message}}\nschema version: initial {{initial-version}}, current {{current-version}}, last {{last-version}}\n\nPlease let us know about this problem at #status public chat. If you press \"Cancel\" button, nothing will happen. If you press \"{{erase-multiaccounts-data-button-text}}\" button, multiaccount's db will be removed and you will be able to unlock multiaccount. All multiaccount's data will be lost.",
|
||||
|
|
Loading…
Reference in New Issue