mirror of
https://github.com/status-im/status-mobile.git
synced 2025-02-04 21:05:18 +00:00
[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 <eric@status.im>
This commit is contained in:
parent
33abdf559a
commit
238b559981
@ -312,7 +312,7 @@
|
|||||||
modal?]
|
modal?]
|
||||||
(letsubs [messages [:chats/current-chat-messages-stream]
|
(letsubs [messages [:chats/current-chat-messages-stream]
|
||||||
current-public-key [:multiaccount/public-key]]
|
current-public-key [:multiaccount/public-key]]
|
||||||
{:component-did-mount
|
{:component-did-update
|
||||||
(fn [args]
|
(fn [args]
|
||||||
(when-not (:messages-initialized? (second (.-argv (.-props args))))
|
(when-not (:messages-initialized? (second (.-argv (.-props args))))
|
||||||
(re-frame/dispatch [:chat.ui/load-more-messages]))
|
(re-frame/dispatch [:chat.ui/load-more-messages]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user