mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-27 16:17:21 -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();
|
toastWindow->show();
|
||||||
|
|
||||||
if(messageToDisplay == "Connection successful") {
|
if(messageToDisplay == "Connection successful") {
|
||||||
|
// Give the toast some time to vanish away
|
||||||
otaManagerWindow = new otaManager(this);
|
QTimer::singleShot(5000, this, SLOT(launchOtaUpdater()));
|
||||||
connect(otaManagerWindow, SIGNAL(canOtaUpdate(bool)), SLOT(openUpdateDialogOTA(bool)));
|
|
||||||
otaManagerWindow->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 showToast(QString messageToDisplay);
|
||||||
void closeIndefiniteToast();
|
void closeIndefiniteToast();
|
||||||
void openUpdateDialogOTA(bool open);
|
void openUpdateDialogOTA(bool open);
|
||||||
|
void launchOtaUpdater();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
|
|
Loading…
Reference in a new issue