From 595d0c7df0ff765d1a4fdff14973863ea3a24c73 Mon Sep 17 00:00:00 2001 From: alwx Date: Tue, 28 Feb 2023 13:20:32 +0100 Subject: [PATCH] Footer is back now --- .../animated_header_flatlist/view.cljs | 6 +- .../contexts/chat/messages/view.cljs | 87 +++++++++---------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/src/quo2/components/animated_header_flatlist/view.cljs b/src/quo2/components/animated_header_flatlist/view.cljs index e5185ee4b8..fccd16b838 100644 --- a/src/quo2/components/animated_header_flatlist/view.cljs +++ b/src/quo2/components/animated_header_flatlist/view.cljs @@ -54,7 +54,7 @@ [title-comp]]])) (defn animated-header-list - [{:keys [header-comp main-comp] :as parameters}] + [{:keys [header-comp main-comp footer-comp] :as parameters}] [safe-area/consumer (fn [insets] (let [window-height (:height (rn/get-window)) @@ -110,4 +110,6 @@ :header (reagent/as-element (header parameters (:top insets) scroll-y)) ;; TODO: https://github.com/status-im/status-mobile/issues/14924 :scroll-event-throttle 8 - :on-scroll (fn [event] (scroll-handler event initial-y scroll-y))}]]))]))]) + :on-scroll (fn [event] (scroll-handler event initial-y scroll-y))}] + + (footer-comp insets)]))]))]) diff --git a/src/status_im2/contexts/chat/messages/view.cljs b/src/status_im2/contexts/chat/messages/view.cljs index 1e23907bcc..aa6c50210f 100644 --- a/src/status_im2/contexts/chat/messages/view.cljs +++ b/src/status_im2/contexts/chat/messages/view.cljs @@ -80,51 +80,48 @@ photo-path (when-not (empty? (:images contact)) (rf/sub [:chats/photo-path chat-id]))] [animated-header-list/animated-header-list - {:theme-color theme-color - :cover-bg-color "#2A799B33" - :header-comp (fn [] - [rn/view - {:style {:flex-direction :row - :align-items :center - :margin-left 8 - :margin-right 8}} - [user-avatar/user-avatar {:full-name display-name - :online? online? - :profile-picture photo-path - :size :small}] - [quo/text {:weight :semi-bold - :number-of-lines 1 - :style {:margin-left 8 - :flex 1}} - display-name]]) - :title-comp (fn [] - [rn/view {:style {:margin-top -36 - :margin-left 20 - :margin-right 20 - :margin-bottom 20}} - [user-avatar/user-avatar {:full-name display-name - :online? online? - :profile-picture photo-path - :size :big}] - [quo/text - {:weight :semi-bold - :size :heading-1 - :style {:margin-top 12} - :number-of-lines 1} - display-name] - [quo/text {:style {:margin-top 8}} - "Web 3.0 Designer @ethstatus • DJ • Producer • Dad • YouTuber."]]) - :main-comp (fn [] - [safe-area/consumer - (fn [insets] - [rn/keyboard-avoiding-view - {:style {:position :relative :flex 1} - :keyboardVerticalOffset (- (:bottom insets))} - [pin.banner/banner chat-id] - [messages.list/messages-list {:chat chat :show-input? show-input?}] - #_(if-not show-input? - [contact-requests.bottom-drawer/view chat-id contact-request-state] - [composer/composer chat-id insets])])])}])) + {:theme-color theme-color + :cover-bg-color "#2A799B33" + :header-comp (fn [] + [rn/view + {:style {:flex-direction :row + :align-items :center + :margin-left 8 + :margin-right 8}} + [user-avatar/user-avatar {:full-name display-name + :online? online? + :profile-picture photo-path + :size :small}] + [quo/text {:weight :semi-bold + :number-of-lines 1 + :style {:margin-left 8 + :flex 1}} + display-name]]) + :title-comp (fn [] + [rn/view {:style {:margin-top -36 + :margin-left 20 + :margin-right 20 + :margin-bottom 20}} + [user-avatar/user-avatar {:full-name display-name + :online? online? + :profile-picture photo-path + :size :big}] + [quo/text + {:weight :semi-bold + :size :heading-1 + :style {:margin-top 12} + :number-of-lines 1} + display-name] + [quo/text {:style {:margin-top 8}} + "Web 3.0 Designer @ethstatus • DJ • Producer • Dad • YouTuber."]]) + :main-comp (fn [] + [messages.list/messages-list {:chat chat :show-input? show-input?}]) + :footer-comp (fn [insets] + [composer/composer chat-id insets])}] + + #_(if-not show-input? + [contact-requests.bottom-drawer/view chat-id contact-request-state] + [composer/composer chat-id insets]))) (defn chat []