Remove useless and possibly problematic code when handling device events

This commit is contained in:
Martchus 2023-09-01 23:25:06 +02:00
parent ae319f604b
commit 3696869a99
1 changed files with 1 additions and 6 deletions

View File

@ -2013,13 +2013,8 @@ void SyncthingConnection::readDeviceEvent(SyncthingEventId eventId, DateTime eve
status = SyncthingDevStatus::Rejected; status = SyncthingDevStatus::Rejected;
} else if (eventType == QLatin1String("DeviceResumed")) { } else if (eventType == QLatin1String("DeviceResumed")) {
paused = false; paused = false;
// FIXME: correct to assume device which has just been resumed is still disconnected?
status = SyncthingDevStatus::Disconnected;
} else if (eventType == QLatin1String("DeviceDiscovered")) { } else if (eventType == QLatin1String("DeviceDiscovered")) {
// we know about this device already, set status anyways because it might still be unknown return; // we know about this device already, nothing to do
if (status == SyncthingDevStatus::Unknown) {
status = SyncthingDevStatus::Disconnected;
}
} else { } else {
return; // can't handle other event types currently return; // can't handle other event types currently
} }