File tree Expand file tree Collapse file tree 2 files changed +19
-17
lines changed Expand file tree Collapse file tree 2 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 7070; ;;; others
7171(defn circle []
7272 [rn/view
73- {:width 8
74- :height 8
73+ {:width 9
74+ :height 9
7575 :border-width 1
7676 :margin 4
7777 :flex 0
8888 {:on-press on-press}
8989 [icon/icon " message-gap-info" {:size 12 :no-color true :container-style {:padding 4 }}]])
9090
91- ; ;;; left/right
92- (defn left []
91+ ; ;;; timeline/body
92+ (defn timeline []
9393 [rn/view {:flex 0
94- :padding-left 11.5
95- :margin-right 20.5
94+ :margin-right 20
9695 :align-items :center
96+ :width 9
9797 :justify-content :space-between }
9898 [circle]
9999 [rn/image {:style {:flex 1 } :source (get-image :circles ) :resize-mode :repeat }]
100100 [circle]])
101101
102- (defn right [timestamp-far timestamp-near chat-id gap-ids on-info-button-pressed]
102+ (defn body [timestamp-far timestamp-near chat-id gap-ids on-info-button-pressed]
103103 [rn/view {:flex 1 }
104104 [rn/view
105- {:flex-direction :row
106- :align-items :center
107- :justify-content :space-between
108- :margin-right 2 }
105+ {:flex-direction :row
106+ :align-items :center
107+ :justify-content :space-between
108+ :margin-right 2 }
109109 [timestamp timestamp-far]
110110 (when on-info-button-pressed [info-button on-info-button-pressed])]
111111
119119 [timestamp timestamp-near]])
120120
121121; ;; main
122- (defn messages- gap
122+ (defn gap
123123 " if `gap-ids` and `chat-id` are provided, press the main text area to fetch messages
124124 if `on-info-button-pressed` fn is provided, the info button will show up and is pressable"
125125 [{:keys [timestamp-far
132132 (fn []
133133 [rn/view
134134 {:on-layout #(reset! body-height (oget % " nativeEvent.layout.height" ))
135- :overflow :hidden }
135+ :overflow :hidden
136+ :flex 1 }
136137 [hborder {:type :top }]
137138 [hborder {:type :bottom }]
138139 [rn/view (merge {:width " 100%"
139140 :background-color (get-color :background )
140141 :flex-direction :row
141142 :padding 20
143+ :padding-left 31
142144 :margin-vertical 4 }
143145 style)
144146
145- [left ]
146- [right timestamp-far timestamp-near chat-id gap-ids on-info-button-pressed]]
147+ [timeline ]
148+ [body timestamp-far timestamp-near chat-id gap-ids on-info-button-pressed]]
147149 [vborder :left body-height]
148150 [vborder :right body-height]])))
Original file line number Diff line number Diff line change 22 (:require
33 [quo.previews.preview :as preview]
44 [quo.react-native :as rn]
5- [quo2.components.messages.gap :as quo2 ]
5+ [quo2.components.messages.gap :as gap ]
66 [reagent.core :as reagent]))
77
88(def descriptor [{:label " Timestamp Far"
2020 [preview/customizer state descriptor]]
2121 [rn/view {:padding-vertical 60
2222 :align-items :center }
23- [quo2/messages- gap @state]]])))
23+ [gap/ gap @state]]])))
2424
2525(defn preview-messages-gap []
2626 [rn/view {:flex 1 }
You can’t perform that action at this time.
0 commit comments