Skip to content

Commit

Permalink
Added delay to enabling Event Mode toggle after toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
erinharrington-12 committed Dec 17, 2024
1 parent dfa6d92 commit 6f657c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/AboutWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ AboutWidget::AboutWidget(Device *device, QWidget *parent)

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

QProcess *myProcess = new QProcess(parent);
myProcess->start("cat", arguments);
Expand Down Expand Up @@ -272,15 +272,16 @@ void AboutWidget::eventModeBackground(int checked)
emit eventModeDisabled();
NetworkManager::ref().enableAP();
}
ui->toggleSwitch->setEnabled(true);
QTimer::singleShot(2000, this, [this]() {

QTimer::singleShot(3000, this, [this]()
{
if (msgBox)
{
msgBox->hide();
delete msgBox;
msgBox = nullptr;
}
});
ui->toggleSwitch->setEnabled(true); });
}

void AboutWidget::developerList()
Expand Down

0 comments on commit 6f657c7

Please sign in to comment.