Allow group creation without contacts

Signed-off-by: Volodymyr Kozieiev <vkjr.sp@gmail.com>
This commit is contained in:
Volodymyr Kozieiev 2020-11-02 19:12:49 +02:00
parent f99b2aa401
commit 0b5be54fea
No known key found for this signature in database
GPG Key ID: 82B04968DF4C0535
2 changed files with 5 additions and 6 deletions

View File

@ -100,7 +100,7 @@
(views/defview new-group []
(views/letsubs [contacts [:selected-group-contacts]
group-name [:new-chat-name]]
(let [save-btn-enabled? (and (spec/valid? :global/not-empty-string group-name) (pos? (count contacts)))]
(let [group-name-empty? (not (spec/valid? :global/not-empty-string group-name))]
[kb-presentation/keyboard-avoiding-view {:style styles/group-container}
[react/view {:flex 1}
[topbar/topbar {:use-insets false
@ -138,7 +138,7 @@
:right
[quo/button {:type :secondary
:accessibility-label :create-group-chat-button
:disabled (not save-btn-enabled?)
:disabled group-name-empty?
:on-press #(debounce/dispatch-and-chill [:group-chats.ui/create-pressed group-name]
300)}
(i18n/label :t/create-group-chat)]}]]])))
@ -180,7 +180,6 @@
[quo/button {:type :secondary
:after :main-icon/next
:accessibility-label :next-button
:disabled (zero? selected-contacts-count)
:on-press #(re-frame/dispatch [:navigate-to :new-group])}
(i18n/label :t/next)]}]]))

View File

@ -2,7 +2,7 @@
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
"owner": "status-im",
"repo": "status-go",
"version": "v0.62.16",
"commit-sha1": "d04e54e54e8ea85c9bd35aff5482e064f5ee76b0",
"src-sha256": "11ry2ncpf5i177c641nvs27b96niwbfwqc79vn3dqkdawr7y0aiy"
"version": "v0.62.17",
"commit-sha1": "9dffff042e9be9ea74cc75a77487ad04777828bf",
"src-sha256": "1a74gd4z95cirj25qqp909h36i8jjg96rdwvy8b8mzngziqbca1w"
}