[#11991] No unread message indicators after navigation back to 'Chats' main view via tap on Chats tab button
This commit is contained in:
parent
073371c4ed
commit
2494c61f85
|
@ -243,8 +243,7 @@
|
|||
(chat.state/reset-visible-item)
|
||||
(fx/merge cofx
|
||||
{:db (dissoc db :current-chat-id)}
|
||||
(offload-messages chat-id)
|
||||
(navigation/navigate-back))))
|
||||
(offload-messages chat-id))))
|
||||
|
||||
(fx/defn remove-chat
|
||||
"Removes chat completely from app, producing all necessary effects for that"
|
||||
|
|
|
@ -968,7 +968,7 @@
|
|||
[(re-frame/subscribe [:chats/raw-chat-messages-stream chat-id])
|
||||
(re-frame/subscribe [:view-id])])
|
||||
(fn [[messages view-id]]
|
||||
(if (= view-id :chat)
|
||||
(if (or (= view-id :chat) (empty? messages))
|
||||
(do
|
||||
(reset! memo-chat-messages-stream messages)
|
||||
messages)
|
||||
|
@ -982,7 +982,7 @@
|
|||
[(re-frame/subscribe [:chats/raw-chat-messages-stream chat-id])
|
||||
(re-frame/subscribe [:view-id])])
|
||||
(fn [[messages view-id]]
|
||||
(if (= view-id :profile)
|
||||
(if (or (= view-id :profile) (empty? messages))
|
||||
(do
|
||||
(reset! memo-profile-messages-stream messages)
|
||||
messages)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
(defn topbar []
|
||||
;;we don't use topbar component, because we want chat view as simple (fast) as possible
|
||||
[react/view {:height 56 :border-bottom-width 1 :border-bottom-color (:ui-01 @quo.colors/theme)}
|
||||
[react/touchable-highlight {:on-press-in #(re-frame/dispatch [:close-chat])
|
||||
[react/touchable-highlight {:on-press-in #(re-frame/dispatch [:navigate-back])
|
||||
:accessibility-label :back-button
|
||||
:style {:height 56 :width 40 :align-items :center :justify-content :center
|
||||
:padding-left 16}}
|
||||
|
@ -331,7 +331,7 @@
|
|||
set-active-panel (get-set-active-panel active-panel)
|
||||
on-close #(set-active-panel nil)]
|
||||
(reagent/create-class
|
||||
{:component-will-unmount #(re-frame/dispatch-sync [:close-chat])
|
||||
{:component-will-unmount #(re-frame/dispatch [:close-chat])
|
||||
:reagent-render
|
||||
(fn []
|
||||
(let [{:keys [chat-id show-input? group-chat admins invitation-admin] :as chat}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
:insets {:top false}
|
||||
:component profile-stack/profile-stack}]])
|
||||
|
||||
(views/defview get-main-component [_]
|
||||
(views/defview main-nav-component []
|
||||
(views/letsubs [logged-in? [:multiaccount/logged-in?]
|
||||
keycard-account? [:multiaccounts/keycard-account?]]
|
||||
[main-stack (merge {:header-mode :none}
|
||||
|
|
|
@ -53,8 +53,6 @@
|
|||
(when debug?
|
||||
(persist-state! state)))
|
||||
|
||||
(defonce main-app-navigator (partial routing/get-main-component false))
|
||||
|
||||
(defn root [_]
|
||||
(reagent/create-class
|
||||
{:component-did-mount
|
||||
|
@ -83,7 +81,7 @@
|
|||
(when debug?
|
||||
{:enableURLHandling true
|
||||
:initialState @state}))
|
||||
[main-app-navigator]]
|
||||
[routing/main-nav-component]]
|
||||
[wallet/select-account]
|
||||
[signing/signing]
|
||||
[bottom-sheets/bottom-sheet]
|
||||
|
|
Loading…
Reference in New Issue