fixed some margin issues when reaction are not present

This commit is contained in:
jo-mut
2024-04-17 15:20:18 +02:00
parent 41e49e57f1
commit 40d9d8bf3a
3 changed files with 16 additions and 16 deletions
@@ -63,8 +63,8 @@
:render-data (assoc render-data :disable-message-long-press? disable-message-long-press?)
:render-fn message-render-fn
:footer [rn/view {:style style/list-footer}]
:content-container-style {:padding-top 16
:padding-bottom 16}
:content-container-style {:padding-top 8
:padding-bottom 8}
:key-fn list-key-fn
:separator [quo/separator {:style {:margin-vertical 8}}]}]
[empty-pinned-messages-state
@@ -9,9 +9,6 @@
(cond-> {:border-radius 16
:margin-horizontal 8}
in-pinned-view?
(assoc :padding-vertical 0)
(and (not in-pinned-view?) (or mentioned pinned-by))
(assoc :background-color colors/primary-50-opa-5 :margin-bottom 4)
@@ -19,16 +16,17 @@
(assoc :margin-top 4)))
(defn user-message-content
[{:keys [outgoing outgoing-status six-reactions? window-scale small-screen?]}]
[{:keys [outgoing outgoing-status six-reactions? window-scale small-screen? in-pinned-view?]}]
{:border-radius 16
:padding-horizontal 8
:padding-top 4
:padding-bottom (if (or small-screen?
(and
(> 3 window-scale)
six-reactions?))
(* message-padding-scaling-ratio window-scale)
4)
:padding-top (if in-pinned-view? 8 4)
:padding-bottom (if in-pinned-view?
5
(when (or small-screen?
(and
(> 3 window-scale)
six-reactions?))
(* message-padding-scaling-ratio window-scale)))
:opacity (if (and outgoing (= outgoing-status :sending))
0.5
1)})
@@ -152,7 +152,7 @@
[]
(let [show-delivery-state? (reagent/atom false)]
(fn [{:keys [message-data context keyboard-shown? show-reactions? in-reaction-and-action-menu?
show-user-info? preview? theme]}]
show-user-info? preview? in-pinned-view? theme]}]
(let [{:keys [content-type quoted-message content outgoing outgoing-status pinned-by pinned
last-in-group? message-id chat-id]} message-data
{:keys [disable-message-long-press?]} context
@@ -195,7 +195,8 @@
:outgoing-status outgoing-status
:small-screen? rn/small-screen?
:window-scale window-scale
:six-reactions? six-reactions?})
:six-reactions? six-reactions?
:in-pinned-view? in-pinned-view?})
:on-press (fn []
(if (and platform/ios? keyboard-shown?)
(do
@@ -337,4 +338,5 @@
{:message-data message-data
:context context
:keyboard-shown? keyboard-shown?
:show-reactions? true}])]))
:show-reactions? true
:in-pinned-view? in-pinned-view?}])]))