[Fixes: #11074] only validate whether group name is blank

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Frank Tang 2020-12-10 21:04:09 +08:00 committed by Andrea Maria Piana
parent 905aa26705
commit 8e882dda21
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
1 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
(ns status-im.group-chats.core
(:refer-clojure :exclude [remove])
(:require [clojure.spec.alpha :as spec]
[clojure.string :as string]
[re-frame.core :as re-frame]
[status-im.chat.models :as models.chat]
[status-im.chat.models.message :as models.message]
@ -120,8 +121,11 @@
nil)
(navigation/navigate-to-cofx :home {})))
(def not-blank?
(complement string/blank?))
(defn- valid-name? [name]
(spec/valid? :profile/name name))
(spec/valid? not-blank? name))
(fx/defn name-changed
"Save chat from edited profile"