[Fixes: #17027] Fix spacing between own messages

This commit is contained in:
Andrea Maria Piana 2023-08-16 17:58:42 +01:00
parent bdedccdda6
commit 79daa4d529
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
2 changed files with 15 additions and 3 deletions

View File

@ -13,3 +13,14 @@
(and (not in-pinned-view?) (or mentioned pinned-by last-in-group?))
(assoc :margin-top 8))))
(defn user-message-content
[{:keys [first-in-group? outgoing outgoing-status]}]
{:border-radius 16
:padding-horizontal 8
:padding-vertical (if first-in-group?
8
4)
:opacity (if (and outgoing (= outgoing-status :sending))
0.5
1)})

View File

@ -134,9 +134,10 @@
:message-sending
:message-sent)
:underlay-color (colors/theme-colors colors/neutral-5 colors/neutral-90)
:style {:border-radius 16
:padding 8
:opacity (if (and outgoing (= outgoing-status :sending)) 0.5 1)}
:style (style/user-message-content
{:first-in-group? (:first-in-group? message-data)
:outgoing outgoing
:outgoing-status outgoing-status})
:on-press (fn []
(if (and platform/ios? keyboard-shown?)
(rn/dismiss-keyboard!)