Skip to content

Commit 79daa4d

Browse files
committed
[Fixes: status-im#17027] Fix spacing between own messages
1 parent bdedccd commit 79daa4d

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

src/status_im2/contexts/chat/messages/content/style.cljs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,14 @@
1313

1414
(and (not in-pinned-view?) (or mentioned pinned-by last-in-group?))
1515
(assoc :margin-top 8))))
16+
17+
(defn user-message-content
18+
[{:keys [first-in-group? outgoing outgoing-status]}]
19+
{:border-radius 16
20+
:padding-horizontal 8
21+
:padding-vertical (if first-in-group?
22+
8
23+
4)
24+
:opacity (if (and outgoing (= outgoing-status :sending))
25+
0.5
26+
1)})

src/status_im2/contexts/chat/messages/content/view.cljs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,10 @@
134134
:message-sending
135135
:message-sent)
136136
:underlay-color (colors/theme-colors colors/neutral-5 colors/neutral-90)
137-
:style {:border-radius 16
138-
:padding 8
139-
:opacity (if (and outgoing (= outgoing-status :sending)) 0.5 1)}
137+
:style (style/user-message-content
138+
{:first-in-group? (:first-in-group? message-data)
139+
:outgoing outgoing
140+
:outgoing-status outgoing-status})
140141
:on-press (fn []
141142
(if (and platform/ios? keyboard-shown?)
142143
(rn/dismiss-keyboard!)

0 commit comments

Comments
 (0)