From 238b55998120314e5a9005faafd4046ed820cdd7 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Mon, 27 Jan 2020 09:12:32 +0100 Subject: [PATCH] [Fixes: #9900] Use component-did-update When moving from chat to chat, component-did-mount is not fired as the component is never unmounted, therefore messages were not loaded. This changes the behavior to use the component-did-update lifecycle method. Signed-off-by: yenda --- src/status_im/ui/screens/chat/views.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index 2568241147..5e1e59e3ab 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -312,7 +312,7 @@ modal?] (letsubs [messages [:chats/current-chat-messages-stream] current-public-key [:multiaccount/public-key]] - {:component-did-mount + {:component-did-update (fn [args] (when-not (:messages-initialized? (second (.-argv (.-props args)))) (re-frame/dispatch [:chat.ui/load-more-messages]))