Skip to content

Commit 6f657c7

Browse files
Added delay to enabling Event Mode toggle after toggling
1 parent dfa6d92 commit 6f657c7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/AboutWidget.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ AboutWidget::AboutWidget(Device *device, QWidget *parent)
4848

4949
// Check if eth0 is active (/sys/class/net/eth0/carrier will output 1 if eth0 is active and 0 if it is not)
5050
QStringList arguments;
51-
arguments << "/sys/class/net/eth0/carrier";
51+
arguments << "/sys/class/net/eno1/carrier";
5252

5353
QProcess *myProcess = new QProcess(parent);
5454
myProcess->start("cat", arguments);
@@ -272,15 +272,16 @@ void AboutWidget::eventModeBackground(int checked)
272272
emit eventModeDisabled();
273273
NetworkManager::ref().enableAP();
274274
}
275-
ui->toggleSwitch->setEnabled(true);
276-
QTimer::singleShot(2000, this, [this]() {
275+
276+
QTimer::singleShot(3000, this, [this]()
277+
{
277278
if (msgBox)
278279
{
279280
msgBox->hide();
280281
delete msgBox;
281282
msgBox = nullptr;
282283
}
283-
});
284+
ui->toggleSwitch->setEnabled(true); });
284285
}
285286

286287
void AboutWidget::developerList()

0 commit comments

Comments
 (0)