|
|
@ -42,7 +42,6 @@ |
|
|
|
#include "dialogs/ReadReceipts.h" |
|
|
|
#include "dialogs/ReadReceipts.h" |
|
|
|
#include "timeline/TimelineViewManager.h" |
|
|
|
#include "timeline/TimelineViewManager.h" |
|
|
|
|
|
|
|
|
|
|
|
constexpr int MAX_INITIAL_SYNC_FAILURES = 7; |
|
|
|
|
|
|
|
constexpr int SYNC_RETRY_TIMEOUT = 40 * 1000; |
|
|
|
constexpr int SYNC_RETRY_TIMEOUT = 40 * 1000; |
|
|
|
constexpr int INITIAL_SYNC_RETRY_TIMEOUT = 240 * 1000; |
|
|
|
constexpr int INITIAL_SYNC_RETRY_TIMEOUT = 240 * 1000; |
|
|
|
|
|
|
|
|
|
|
@ -975,19 +974,6 @@ ChatPage::retryInitialSync() |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
initialSyncFailures_ += 1; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (initialSyncFailures_ >= MAX_INITIAL_SYNC_FAILURES) { |
|
|
|
|
|
|
|
initialSyncFailures_ = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deleteConfigs(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
emit showLoginPage( |
|
|
|
|
|
|
|
tr("The client couldn't sync with the server. Please try again.")); |
|
|
|
|
|
|
|
emit contentLoaded(); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
qWarning() << "Retrying initial sync"; |
|
|
|
qWarning() << "Retrying initial sync"; |
|
|
|
|
|
|
|
|
|
|
|
client_->initialSync(); |
|
|
|
client_->initialSync(); |
|
|
|