Skip to content

Commit 9d76913

Browse files
committed
Fix topbar back-button flickering
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
1 parent f69ae44 commit 9d76913

File tree

6 files changed

+11
-3
lines changed

6 files changed

+11
-3
lines changed

src/status_im/ui/components/chat_icon/screen.cljs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
[status-im.ui.screens.chat.photos :as photos]
99
[status-im.utils.platform :as platform]))
1010

11+
;;TODO REWORK THIS NAMESPACE
12+
1113
(defn default-chat-icon [name styles]
1214
(when-not (string/blank? name)
1315
[react/view (:default-chat-icon styles)

src/status_im/ui/components/topbar.cljs

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
[react/text {:style {:color colors/blue}}
3434
(utils.label/stringify label)])]]))
3535

36+
(def default-title-padding 16)
3637
;; TODO(Ferossgp): Tobbar should handle safe area
37-
(defn topbar [_]
38-
(let [title-padding (reagent/atom 16)]
38+
(defn topbar [{:keys [initial-title-padding]}]
39+
(let [title-padding (reagent/atom (or initial-title-padding default-title-padding))]
3940
(fn [& [{:keys [title navigation accessories show-border? modal? content]}]]
4041
(let [navigation (or navigation (default-navigation modal?))]
4142
[react/view (cond-> {:height 56 :align-items :center :flex-direction :row}

src/status_im/ui/screens/chat/message/message.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
appender])
3939

4040
(defview quoted-message
41-
[_ {:keys [from text]} outgoing current-public-key public?]
41+
[_ {:keys [from text image]} outgoing current-public-key public?]
4242
(letsubs [contact-name [:contacts/contact-name-by-identity from]]
4343
[react/view {:style (style/quoted-message-container outgoing)}
4444
[react/view {:style style/quoted-message-author-container}

src/status_im/ui/screens/chat/sheets.cljs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[status-im.utils.universal-links.core :as universal-links]
77
[status-im.ui.components.chat-icon.screen :as chat-icon]
88
[status-im.ui.components.colors :as colors]
9+
[status-im.multiaccounts.core :as multiaccounts]
910
[status-im.utils.platform :as platform]
1011
[status-im.ui.screens.chat.styles.message.sheets :as sheets.styles]
1112
[status-im.ui.components.list-item.views :as list-item]))

src/status_im/ui/screens/chat/views.cljs

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
[topbar/topbar
2828
{:content [toolbar-content/toolbar-content-view]
2929
:show-border? true
30+
:initial-title-padding 56
3031
:navigation {:icon :main-icons/back
3132
:accessibility-label :back-button
3233
:handler

src/status_im/ui/screens/home/views/inner_item.cljs

+3
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@
121121
:else nil)
122122
:title (if group-chat
123123
(utils/truncate-str chat-name 30)
124+
;; This looks a bit odd, but I would like only to subscribe
125+
;; if it's a one-to-one. If wrapped in a component styling
126+
;; won't be applied correctly.
124127
@(re-frame/subscribe [:contacts/contact-name-by-identity chat-id]))
125128
:title-accessibility-label :chat-name-text
126129
:title-row-accessory [message-timestamp (if (pos? (:whisper-timestamp last-message))

0 commit comments

Comments
 (0)