Fix coming back from offline
Fixes: #11305 The issue was due to the fact that the first condition was wrapped in a when in fx merge, causing it to be ignored. Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
ff3f171646
commit
79bded1023
|
@ -170,7 +170,7 @@
|
||||||
:group-chat true
|
:group-chat true
|
||||||
:contacts #{}
|
:contacts #{}
|
||||||
:public? true
|
:public? true
|
||||||
:might-have-join-time-messages? (get-in cofx [:multiaccount :use-mailservers?])
|
:might-have-join-time-messages? (get-in cofx [:db :multiaccount :use-mailservers?])
|
||||||
:unviewed-messages-count 0
|
:unviewed-messages-count 0
|
||||||
:loaded-unviewed-messages-ids #{}}
|
:loaded-unviewed-messages-ids #{}}
|
||||||
nil))
|
nil))
|
||||||
|
|
|
@ -244,8 +244,8 @@
|
||||||
use-mailservers? (fetch-use-mailservers? cofx)
|
use-mailservers? (fetch-use-mailservers? cofx)
|
||||||
added? (registered-peer? peers-summary address)
|
added? (registered-peer? peers-summary address)
|
||||||
gap-request? (executing-gap-request? db)]
|
gap-request? (executing-gap-request? db)]
|
||||||
(fx/merge cofx
|
|
||||||
(when use-mailservers?
|
(when use-mailservers?
|
||||||
|
(fx/merge cofx
|
||||||
{:db (cond-> (dissoc db :mailserver/current-request)
|
{:db (cond-> (dissoc db :mailserver/current-request)
|
||||||
gap-request?
|
gap-request?
|
||||||
(-> (assoc :mailserver/fetching-gaps-in-progress {})
|
(-> (assoc :mailserver/fetching-gaps-in-progress {})
|
||||||
|
|
|
@ -637,7 +637,7 @@
|
||||||
(testing "it returns noops when use-mailservers? is false"
|
(testing "it returns noops when use-mailservers? is false"
|
||||||
(let [no-mailservers-cofx {:db (assoc-in db [:multiaccount :use-mailservers?] false)}]
|
(let [no-mailservers-cofx {:db (assoc-in db [:multiaccount :use-mailservers?] false)}]
|
||||||
(is (= (mailserver/connect-to-mailserver no-mailservers-cofx)
|
(is (= (mailserver/connect-to-mailserver no-mailservers-cofx)
|
||||||
no-mailservers-cofx))))))
|
nil))))))
|
||||||
|
|
||||||
(deftest check-existing-gaps
|
(deftest check-existing-gaps
|
||||||
(testing "no gaps"
|
(testing "no gaps"
|
||||||
|
|
Loading…
Reference in New Issue