Dont use network info but only rely on peers count for mailservers

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
Andrea Maria Piana 2019-11-04 14:41:18 +01:00
parent 76be2c279f
commit 1c63c782a4
No known key found for this signature in database
GPG Key ID: AA6CCA6DE0E06424
4 changed files with 13 additions and 13 deletions

View File

@ -472,16 +472,6 @@
[{:keys [db]}]
{:db (dissoc db :mailserver/request-to)})
(fx/defn network-connection-status-changed
"when host reconnects, reset request-to and
reconnect to mailserver"
[{:keys [db] :as cofx} is-connected?]
(when (and (multiaccounts.model/logged-in? cofx)
is-connected?)
(fx/merge cofx
(reset-request-to)
(connect-to-mailserver))))
(fx/defn remove-gaps
[{:keys [db] :as cofx} chat-id]
(fx/merge cofx

View File

@ -16,8 +16,7 @@
{:db (assoc db :network-status (if is-connected? :online :offline))}
(when is-connected?
(if-not (= (count (get-in db [:wallet :accounts])) (count (get-in db [:multiaccount :accounts])))
(wallet/update-balances nil)))
(mailserver/network-connection-status-changed is-connected?)))
(wallet/update-balances nil)))))
(fx/defn change-network-type
[{:keys [db] :as cofx} old-network-type network-type expensive?]

View File

@ -72,7 +72,7 @@ class TestMessagesOneToOneChatMultiple(MultipleDeviceTestCase):
chat_2.connection_status.wait_for_invisibility_of_element(60)
message_2 = 'one more message'
chat_2.chat_message_input.send_keys(message_2)
chat_2.send_message_button.click()
chat_2.send_message_button.click_until_absense_of_element(chat_2.send_message_button)
home_1.toggle_airplane_mode() # turning on WiFi connection on primary device

View File

@ -280,3 +280,14 @@ class BaseButton(BaseElement):
return self.navigate()
except (NoSuchElementException, TimeoutException):
counter += 1
def click_until_absense_of_element(self, desired_element, attempts=3):
counter = 0
while desired_element.is_element_present(1) and counter <= attempts:
try:
self.driver.info('Tap on %s' % self.name)
self.find_element().click()
self.driver.info('Wait for %s' % desired_element.name)
counter += 1
except (NoSuchElementException, TimeoutException):
return self.navigate()