Skip to content

Commit a0d8c22

Browse files
committed
another attempt to fix issue status-im#607
1 parent 13e9283 commit a0d8c22

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

src/status_im/chat/handlers.cljs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,9 @@
362362
(when (= current-chat-id wallet-chat-id)
363363
(dispatch [:cancel-command]))
364364
(dispatch [:load-requests! chat-id])
365-
(if-not commands-loaded?
365+
;; todo rewrite this. temporary fix for https://github.com/status-im/status-react/issues/607
366+
(dispatch [:load-commands! chat-id])
367+
#_(if-not commands-loaded?
366368
(dispatch [:load-commands! chat-id])
367369
(dispatch [:invoke-chat-loaded-callbacks chat-id]))
368370
(if (and (seq messages)

src/status_im/commands/handlers/loading.cljs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
(let [identity (or identity current-chat-id)
2121
contact (or (get contacts identity)
2222
{:whisper-identity identity})]
23-
(dispatch [::fetch-commands! contact]))
23+
(when identity
24+
(dispatch [::fetch-commands! contact])))
2425
;; todo uncomment
2526
#_(if-let [{:keys [file]} (commands/get-by-chat-id identity)]
2627
(dispatch [::parse-commands! identity file])

src/status_im/protocol/handlers.cljs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,5 @@
410410
(let [message (.-message error)]
411411
(when (or (re-find (re-pattern "Could not connect to the server.") message)
412412
(re-find (re-pattern "Failed to connect") message))
413-
(status/restart-rpc))))))
413+
(status/restart-rpc)
414+
(dispatch [:load-commands!]))))))

0 commit comments

Comments
 (0)