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