File tree 4 files changed +9
-2
lines changed
4 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 8
8
[status-im.ui.screens.chat.photos :as photos]
9
9
[status-im.utils.platform :as platform]))
10
10
11
+ ; ;TODO REWORK THIS NAMESPACE
12
+
11
13
(defn default-chat-icon [name styles]
12
14
(when-not (string/blank? name)
13
15
[react/view (:default-chat-icon styles)
Original file line number Diff line number Diff line change 33
33
[react/text {:style {:color colors/blue}}
34
34
(utils.label/stringify label)])]]))
35
35
36
+ (def default-title-padding 16 )
36
37
; ; TODO(Ferossgp): Tobbar should handle safe area
37
- (defn topbar [_ ]
38
- (let [title-padding (reagent/atom 16 )]
38
+ (defn topbar [{ :keys [initial-title-padding] :as opts} ]
39
+ (let [title-padding (reagent/atom ( or initial-title-padding default-title-padding ) )]
39
40
(fn [& [{:keys [title navigation accessories show-border? modal? content]}]]
40
41
(let [navigation (or navigation (default-navigation modal? ))]
41
42
[react/view (cond-> {:height 56 :align-items :center :flex-direction :row }
Original file line number Diff line number Diff line change 26
26
[topbar/topbar
27
27
{:content [toolbar-content/toolbar-content-view]
28
28
:show-border? true
29
+ :initial-title-padding 56
29
30
:navigation {:icon :main-icons/back
30
31
:accessibility-label :back-button
31
32
:handler
Original file line number Diff line number Diff line change 116
116
:else nil )
117
117
:title (if group-chat
118
118
(utils/truncate-str chat-name 30 )
119
+ ; ; This looks a bit odd, but I would like only to subscribe
120
+ ; ; if it's a one-to-one. If wrapped in a component styling
121
+ ; ; won't be applied correctly.
119
122
@(re-frame/subscribe [:contacts/contact-name-by-identity chat-id]))
120
123
:title-accessibility-label :chat-name-text
121
124
:title-row-accessory [message-timestamp (if (pos? (:whisper-timestamp last-message))
You can’t perform that action at this time.
0 commit comments