Merge pull request #409 from status-im/feature/#381

Fix for red screen on login (#381)

Former-commit-id: 4c4c7a939b
This commit is contained in:
Roman Volosovskyi 2016-11-02 22:36:52 +02:00 committed by GitHub
commit 4218014337
1 changed files with 4 additions and 6 deletions

View File

@ -207,12 +207,10 @@
(defn reset-pending-messages! [to]
(doseq [key (@recipient->pending-message to)]
(swap! messages
(fn [messages]
(when (get-in messages key)
(update-in messages key assoc
:last-attempt 0
:attempts 0))))))
(when (get-in @messages key)
(swap! messages #(update-in % key assoc
:last-attempt 0
:attempts 0)))))
(defn reset-all-pending-messages! []
(reset! messages {}))