Avoid considering manually changed devs handling metered network

This commit is contained in:
Martchus 2024-02-16 17:37:52 +01:00
parent 4a61f552a2
commit 57d47de74c
1 changed files with 7 additions and 0 deletions

View File

@ -362,6 +362,13 @@ bool SyncthingConnection::pauseResumeDevice(const QStringList &devIds, bool paus
reply->setProperty("devIds", devIds);
reply->setProperty("resume", !paused);
QObject::connect(reply, &QNetworkReply::finished, this, &SyncthingConnection::readDevPauseResume);
// avoid considering manually paused or resumed devices when the network connection is no longer metered
if (!m_devsPausedDueToMeteredConnection.isEmpty()) {
for (const auto &devId : devIds) {
m_devsPausedDueToMeteredConnection.removeAll(devId);
}
}
return true;
}