fixed active button position

This commit is contained in:
Andrey Shovkoplyas 2017-03-30 11:07:14 +03:00 committed by Roman Volosovskyi
parent d6a589b5bc
commit 60680f7293

View File

@ -140,22 +140,23 @@
edit? [:get-in [:contacts-ui-props :edit?]] edit? [:get-in [:contacts-ui-props :edit?]]
groups [:all-added-groups] groups [:all-added-groups]
tabs-hidden? [:tabs-hidden?]] tabs-hidden? [:tabs-hidden?]]
[view (st/contacts-list-container tabs-hidden?) [view {:flex 1}
(if edit? [view (st/contacts-list-container tabs-hidden?)
[toolbar-edit] (if edit?
[toolbar-view]) [toolbar-edit]
(if (pos? (+ (count groups) contacts-count)) [toolbar-view])
[scroll-view {:style st/contact-groups} (if (pos? (+ (count groups) contacts-count))
(when (pos? contacts-count) [scroll-view {:style st/contact-groups}
[contact-group-form {:contacts contacts (when (pos? contacts-count)
:contacts-count contacts-count [contact-group-form {:contacts contacts
:edit? edit?}]) :contacts-count contacts-count
(for [group groups] :edit? edit?}])
^{:key group} (for [group groups]
[contact-group-view {:group group ^{:key group}
:edit? edit?}])] [contact-group-view {:group group
[view st/empty-contact-groups :edit? edit?}])]
[react/icon :group_big st/empty-contacts-icon] [view st/empty-contact-groups
[text {:style st/empty-contacts-text} (label :t/no-contacts)]]) [react/icon :group_big st/empty-contacts-icon]
[text {:style st/empty-contacts-text} (label :t/no-contacts)]])]
(when (and (not edit?) (get-in platform-specific [:contacts :action-button?])) (when (and (not edit?) (get-in platform-specific [:contacts :action-button?]))
[contacts-action-button])]) [contacts-action-button])])