mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Delay OTA check after successful network connection
This commit is contained in:
parent
eab27fabd9
commit
b8f4da12f7
2 changed files with 9 additions and 4 deletions
|
@ -962,10 +962,8 @@ void MainWindow::showToast(QString messageToDisplay) {
|
|||
toastWindow->show();
|
||||
|
||||
if(messageToDisplay == "Connection successful") {
|
||||
|
||||
otaManagerWindow = new otaManager(this);
|
||||
connect(otaManagerWindow, SIGNAL(canOtaUpdate(bool)), SLOT(openUpdateDialogOTA(bool)));
|
||||
otaManagerWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||
// Give the toast some time to vanish away
|
||||
QTimer::singleShot(5000, this, SLOT(launchOtaUpdater()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -987,3 +985,9 @@ void MainWindow::openUpdateDialogOTA(bool open) {
|
|||
;
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::launchOtaUpdater() {
|
||||
otaManagerWindow = new otaManager(this);
|
||||
connect(otaManagerWindow, SIGNAL(canOtaUpdate(bool)), SLOT(openUpdateDialogOTA(bool)));
|
||||
otaManagerWindow->setAttribute(Qt::WA_DeleteOnClose);
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ private slots:
|
|||
void showToast(QString messageToDisplay);
|
||||
void closeIndefiniteToast();
|
||||
void openUpdateDialogOTA(bool open);
|
||||
void launchOtaUpdater();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
|
Loading…
Reference in a new issue