[#10928] Always show blocked users

This commit is contained in:
Roman Volosovskyi 2020-07-15 10:18:54 +03:00
parent cd4b2110c6
commit 292df1439c
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 16 additions and 18 deletions

View File

@ -32,33 +32,31 @@
contacts [:contacts/active]]
[react/view {:flex 1}
[topbar/topbar {:title :t/contacts}]
(if (seq contacts)
[react/scroll-view {:flex 1}
[add-new-contact]
(when (pos? blocked-contacts-count)
[react/view {:margin-vertical 16}
[quo/list-item
{:title (i18n/label :t/blocked-users)
:icon :main-icons/cancel
:theme :negative
:accessibility-label :blocked-users-list-button
:chevron true
:accessory :text
:accessory-text blocked-contacts-count
:on-press #(re-frame/dispatch [:navigate-to :blocked-users-list])}]])
[react/scroll-view {:flex 1}
[add-new-contact]
(when (pos? blocked-contacts-count)
[react/view {:margin-vertical 16}
[quo/list-item
{:title (i18n/label :t/blocked-users)
:icon :main-icons/cancel
:theme :negative
:accessibility-label :blocked-users-list-button
:chevron true
:accessory :text
:accessory-text blocked-contacts-count
:on-press #(re-frame/dispatch [:navigate-to :blocked-users-list])}]])
(if (seq contacts)
[list.views/flat-list
{:data contacts
:key-fn :address
:render-fn contacts-list-item}]]
[react/view {:flex 1}
[add-new-contact]
:render-fn contacts-list-item}]
[react/view {:align-items :center :flex 1 :justify-content :center}
[react/text {:style {:color colors/gray :margin-vertical 24}}
(i18n/label :t/you-dont-have-contacts)]
[quo/button
{:accessibility-label :invite-friends
:on-press #(list-selection/open-share {:message (i18n/label :t/get-status-at)})}
(i18n/label :t/invite-friends)]]])]))
(i18n/label :t/invite-friends)]])]]))
(defview blocked-users-list []
(letsubs [blocked-contacts [:contacts/blocked]]