Fix desktop msg loading and signin
Signed-off-by: Vitaliy Vlasov <siphiuel@gmail.com>
This commit is contained in:
parent
8be8f0b5c8
commit
51a7c537f8
|
@ -159,10 +159,7 @@
|
|||
(let [restart {:db (assoc db :node/restart? true :node/address address)}]
|
||||
(case status
|
||||
:started nil
|
||||
:starting (do
|
||||
(when utils.platform/desktop?
|
||||
(status/stop-node))
|
||||
restart)
|
||||
:starting restart
|
||||
:stopping restart
|
||||
(start cofx address))))
|
||||
|
||||
|
|
|
@ -206,8 +206,12 @@
|
|||
current-public-key [:account/public-key]
|
||||
messages-to-load (reagent/atom load-step)
|
||||
chat-id* (reagent/atom nil)]
|
||||
{:component-did-update #(load-more (count messages) messages-to-load)
|
||||
:component-did-mount #(load-more (count messages) messages-to-load)}
|
||||
{:component-did-update #(if (:messages-initialized? (second (.-argv (.-props %1))))
|
||||
(load-more (count messages) messages-to-load)
|
||||
(re-frame/dispatch [:chat.ui/load-more-messages]))
|
||||
:component-did-mount #(if (:messages-initialized? (second (.-argv (.-props %1))))
|
||||
(load-more (count messages) messages-to-load)
|
||||
(re-frame/dispatch [:chat.ui/load-more-messages]))}
|
||||
(let [scroll-ref (atom nil)
|
||||
scroll-timer (atom nil)
|
||||
scroll-height (atom nil)
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
(views/defview chat-list-item-inner-view [{:keys [chat-id name group-chat
|
||||
color public? public-key
|
||||
timestamp
|
||||
last-message-content
|
||||
last-message-type]
|
||||
:as chat-item}]
|
||||
|
@ -29,6 +30,7 @@
|
|||
chat-name [:chats/chat-name chat-id]
|
||||
current-chat-id [:chats/current-chat-id]]
|
||||
(let [last-message {:content last-message-content
|
||||
:timestamp timestamp
|
||||
:message-type last-message-type}
|
||||
name (or chat-name
|
||||
(gfycat/generate-gfy public-key))
|
||||
|
|
Loading…
Reference in New Issue