summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-08 21:35:37 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-08 21:35:37 +0300
commitebe36b5713c5c85b8b85d1c15653f3f66b342823 (patch)
treee4e2850199f5ce1820f2e4950f5a1dc9f93646f4 /include
parentPrevent FOUC (diff)
downloadnheko-ebe36b5713c5c85b8b85d1c15653f3f66b342823.tar.xz
Drop the loading screen if consensus can't be achieved
Diffstat (limited to 'include')
-rw-r--r--include/ChatPage.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/ChatPage.h b/include/ChatPage.h

index 0a6d303b..ad1ec9e3 100644 --- a/include/ChatPage.h +++ b/include/ChatPage.h
@@ -34,6 +34,10 @@ #include "TypingDisplay.h" #include "UserInfoWidget.h" +constexpr int CONSENSUS_TIMEOUT = 1000; +constexpr int SHOW_CONTENT_TIMEOUT = 3000; +constexpr int SYNC_INTERVAL = 2000; + class ChatPage : public QWidget { Q_OBJECT @@ -96,9 +100,10 @@ private: TextInputWidget *text_input_; TypingDisplay *typingDisplay_; + // Safety net if consensus is not possible or too slow. + QTimer *showContentTimer_; QTimer *consensusTimer_; - QTimer *sync_timer_; - int sync_interval_; + QTimer *syncTimer_; QString current_room_; QMap<QString, QPixmap> room_avatars_;