summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-20 22:32:48 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-20 22:32:48 +0300
commit13e526c27d91c5cfa61ef709b7d1b0e709ba59fb (patch)
tree1b87c3c3894aa0ed71f276838a1d7011d26da5c9 /include
parentMove ctrl-k callback to the MainWindow (diff)
downloadnheko-13e526c27d91c5cfa61ef709b7d1b0e709ba59fb.tar.xz
Retry initial sync (#19)
Diffstat (limited to 'include')
-rw-r--r--include/ChatPage.h7
-rw-r--r--include/LoginPage.h7
-rw-r--r--include/MatrixClient.h1
3 files changed, 12 insertions, 3 deletions
diff --git a/include/ChatPage.h b/include/ChatPage.h

index 4c8ed05b..bac83ece 100644 --- a/include/ChatPage.h +++ b/include/ChatPage.h
@@ -56,6 +56,7 @@ signals: void changeWindowTitle(const QString &msg); void unreadMessages(int count); void showNotification(const QString &msg); + void showLoginPage(const QString &msg); private slots: void showUnreadMessageNotification(int count); @@ -74,6 +75,8 @@ private: void updateTypingUsers(const QString &roomid, const QList<QString> &user_ids); void updateDisplayNames(const RoomState &state); void loadStateFromCache(); + void deleteConfigs(); + void resetUI(); QHBoxLayout *topLayout_; Splitter *splitter; @@ -121,4 +124,8 @@ private: // LMDB wrapper. QSharedPointer<Cache> cache_; + + // If the number of failures exceeds a certain threshold we + // return to the login page. + int initialSyncFailures = 0; }; diff --git a/include/LoginPage.h b/include/LoginPage.h
index 5caa3f1e..88cffaf3 100644 --- a/include/LoginPage.h +++ b/include/LoginPage.h
@@ -43,6 +43,10 @@ public: signals: void backButtonClicked(); +public slots: + // Displays errors produced during the login. + void loginError(QString error_message); + private slots: // Callback for the back button. void onBackButtonClicked(); @@ -56,9 +60,6 @@ private slots: // Callback for probing the manually entered server void onServerAddressEntered(); - // Displays errors produced during the login. - void loginError(QString error_message); - // Callback for errors produced during server probing void versionError(QString error_message); diff --git a/include/MatrixClient.h b/include/MatrixClient.h
index 01e2c319..0185bf64 100644 --- a/include/MatrixClient.h +++ b/include/MatrixClient.h
@@ -91,6 +91,7 @@ signals: // Returned profile data for the user's account. void getOwnProfileResponse(const QUrl &avatar_url, const QString &display_name); void initialSyncCompleted(const SyncResponse &response); + void initialSyncFailed(const QString &msg); void syncCompleted(const SyncResponse &response); void syncFailed(const QString &msg); void joinFailed(const QString &msg);