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 70
70
; ;;; others
71
71
(defn circle []
72
72
[rn/view
73
- {:width 8
74
- :height 8
73
+ {:width 9
74
+ :height 9
75
75
:border-width 1
76
76
:margin 4
77
77
:flex 0
88
88
{:on-press on-press}
89
89
[icon/icon " message-gap-info" {:size 12 :no-color true :container-style {:padding 4 }}]])
90
90
91
- ; ;;; left/right
92
- (defn left []
91
+ ; ;;; timeline/body
92
+ (defn timeline []
93
93
[rn/view {:flex 0
94
- :padding-left 11.5
95
- :margin-right 20.5
94
+ :margin-right 20
96
95
:align-items :center
96
+ :width 9
97
97
:justify-content :space-between }
98
98
[circle]
99
99
[rn/image {:style {:flex 1 } :source (get-image :circles ) :resize-mode :repeat }]
100
100
[circle]])
101
101
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]
103
103
[rn/view {:flex 1 }
104
104
[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 }
109
109
[timestamp timestamp-far]
110
110
(when on-info-button-pressed [info-button on-info-button-pressed])]
111
111
119
119
[timestamp timestamp-near]])
120
120
121
121
; ;; main
122
- (defn messages- gap
122
+ (defn gap
123
123
" if `gap-ids` and `chat-id` are provided, press the main text area to fetch messages
124
124
if `on-info-button-pressed` fn is provided, the info button will show up and is pressable"
125
125
[{:keys [timestamp-far
132
132
(fn []
133
133
[rn/view
134
134
{:on-layout #(reset! body-height (oget % " nativeEvent.layout.height" ))
135
- :overflow :hidden }
135
+ :overflow :hidden
136
+ :flex 1 }
136
137
[hborder {:type :top }]
137
138
[hborder {:type :bottom }]
138
139
[rn/view (merge {:width " 100%"
139
140
:background-color (get-color :background )
140
141
:flex-direction :row
141
142
:padding 20
143
+ :padding-left 31
142
144
:margin-vertical 4 }
143
145
style)
144
146
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]]
147
149
[vborder :left body-height]
148
150
[vborder :right body-height]])))
Original file line number Diff line number Diff line change 2
2
(:require
3
3
[quo.previews.preview :as preview]
4
4
[quo.react-native :as rn]
5
- [quo2.components.messages.gap :as quo2 ]
5
+ [quo2.components.messages.gap :as gap ]
6
6
[reagent.core :as reagent]))
7
7
8
8
(def descriptor [{:label " Timestamp Far"
20
20
[preview/customizer state descriptor]]
21
21
[rn/view {:padding-vertical 60
22
22
:align-items :center }
23
- [quo2/messages- gap @state]]])))
23
+ [gap/ gap @state]]])))
24
24
25
25
(defn preview-messages-gap []
26
26
[rn/view {:flex 1 }
You can’t perform that action at this time.
0 commit comments