Handle empty photo path

This commit is contained in:
virvar 2016-05-20 10:55:17 +03:00
parent d9a44d9c0b
commit 62fb91fba6
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@
(defview chat-icon-view [chat-id group-chat name color online styles]
[photo-path [:chat-photo chat-id]]
[view (:container styles)
(if photo-path
(if (and photo-path (not (empty? photo-path)))
[chat-icon photo-path styles]
[default-chat-icon name color styles])
(when (not group-chat)
@ -81,7 +81,7 @@
:default-chat-icon (st/default-chat-icon-profile color)
:default-chat-icon-text st/default-chat-icon-text}]
[view (:container styles)
(if photo-path
(if (and photo-path (not (empty? photo-path)))
[chat-icon photo-path styles]
[default-chat-icon name color styles])
[contact-online online styles]]))