Show loading indicator while waiting for /login & /logout

fixes #208
This commit is contained in:
Konstantinos Sideris 2018-02-18 22:22:26 +02:00
parent 7e2f835eec
commit c8bfb02211
6 changed files with 44 additions and 28 deletions

View file

@ -77,6 +77,7 @@ signals:
void showNotification(const QString &msg);
void showLoginPage(const QString &msg);
void showUserSettingsPage();
void showOverlayProgressBar();
private slots:
void showUnreadMessageNotification(int count);

View file

@ -40,6 +40,8 @@ public:
signals:
void backButtonClicked();
void loggingIn();
void errorOccured();
protected:
void paintEvent(QPaintEvent *event) override;

View file

@ -59,7 +59,11 @@ private slots:
void iconActivated(QSystemTrayIcon::ActivationReason reason);
//! Show the welcome page in the main window.
void showWelcomePage() { pageStack_->setCurrentWidget(welcome_page_); }
void showWelcomePage()
{
removeOverlayProgressBar();
pageStack_->setCurrentWidget(welcome_page_);
}
//! Show the login page in the main window.
void showLoginPage() { pageStack_->setCurrentWidget(login_page_); }
@ -73,6 +77,7 @@ private slots:
//! Show the chat page and start communicating with the given access token.
void showChatPage(QString user_id, QString home_server, QString token);
void showOverlayProgressBar();
void removeOverlayProgressBar();
private: