mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Initialize sync timer
This commit is contained in:
parent
e1f7ef88cd
commit
5bcaaa3aa3
2 changed files with 5 additions and 2 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -13,6 +13,8 @@ tags
|
||||||
*.dll
|
*.dll
|
||||||
*.dylib
|
*.dylib
|
||||||
|
|
||||||
|
vgcore.*
|
||||||
|
|
||||||
# Qt-es
|
# Qt-es
|
||||||
|
|
||||||
/.qmake.cache
|
/.qmake.cache
|
||||||
|
|
|
@ -50,6 +50,9 @@ ChatPage::ChatPage(QWidget *parent)
|
||||||
|
|
||||||
user_info_widget_ = new UserInfoWidget(ui->sideBarTopWidget);
|
user_info_widget_ = new UserInfoWidget(ui->sideBarTopWidget);
|
||||||
|
|
||||||
|
sync_timer_ = new QTimer(this);
|
||||||
|
connect(sync_timer_, SIGNAL(timeout()), this, SLOT(startSync()));
|
||||||
|
|
||||||
connect(room_list_,
|
connect(room_list_,
|
||||||
SIGNAL(roomChanged(const RoomInfo &)),
|
SIGNAL(roomChanged(const RoomInfo &)),
|
||||||
this,
|
this,
|
||||||
|
@ -147,8 +150,6 @@ void ChatPage::initialSyncCompleted(SyncResponse response)
|
||||||
view_manager_->initialize(response.rooms());
|
view_manager_->initialize(response.rooms());
|
||||||
room_list_->setInitialRooms(response.rooms());
|
room_list_->setInitialRooms(response.rooms());
|
||||||
|
|
||||||
sync_timer_ = new QTimer(this);
|
|
||||||
connect(sync_timer_, SIGNAL(timeout()), this, SLOT(startSync()));
|
|
||||||
sync_timer_->start(sync_interval_);
|
sync_timer_->start(sync_interval_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue