Add cellular settings, add connection disturbed popup
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user