Show link preview image if thumbnailUrl is not empty

Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
Ismael 2021-08-03 23:21:44 +02:00 committed by andrey
parent 25a6495d37
commit d8fb0e866b
No known key found for this signature in database
GPG Key ID: 89B67245FD2F0272
1 changed files with 4 additions and 3 deletions

View File

@ -86,9 +86,10 @@
(re-frame/dispatch
[:browser.ui/message-link-pressed link]))}
[react/view (styles/link-preview-wrapper outgoing timeline)
(when-not (string/blank? thumbnailUrl)
[react/image {:source {:uri thumbnailUrl}
:style (styles/link-preview-image outgoing (select-keys preview-data [:height :width]))
:accessibility-label :member-photo}]
:accessibility-label :member-photo}])
(when-not (is-gif? thumbnailUrl)
[:<>
[quo/text {:size :small