Add cellular settings, add connection disturbed popup

This commit is contained in:
2024-07-18 19:08:01 +02:00
parent 3c20fb2943
commit 418b1b13fa
10 changed files with 278 additions and 102 deletions
+9
View File
@@ -132,6 +132,7 @@ void DeviceConnection::messageReceived(const QVariant &variant)
}
const auto &type = typeVariant.toString();
qDebug() << type;
bool omitLog{};
if (type == "hello")
@@ -277,6 +278,8 @@ void DeviceConnection::messageReceived(const QVariant &variant)
{
omitLog = true;
emit hideDisturbed();
bool partial{};
if (auto iter = map.find("partial"); iter != std::cend(map))
@@ -359,6 +362,10 @@ void DeviceConnection::messageReceived(const QVariant &variant)
}
}
}
else if (type == "offline")
{
emit showDisturbed();
}
if (!omitLog)
{
@@ -465,6 +472,8 @@ void DeviceConnection::disconnected()
qDebug() << "called";
emit logMessage(tr("Disconnected!"));
emit showDisturbed();
emit logMessage(tr("Reconnecting to %0").arg(m_url));
QTimer::singleShot(1s, this, [this](){
m_websocket.open(QUrl{m_url});