From 3696869a9946b8a134eff3f20671623f87f406bf Mon Sep 17 00:00:00 2001 From: Martchus Date: Fri, 1 Sep 2023 23:25:06 +0200 Subject: [PATCH] Remove useless and possibly problematic code when handling device events --- syncthingconnector/syncthingconnection_requests.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/syncthingconnector/syncthingconnection_requests.cpp b/syncthingconnector/syncthingconnection_requests.cpp index a264124..e9fba89 100644 --- a/syncthingconnector/syncthingconnection_requests.cpp +++ b/syncthingconnector/syncthingconnection_requests.cpp @@ -2013,13 +2013,8 @@ void SyncthingConnection::readDeviceEvent(SyncthingEventId eventId, DateTime eve status = SyncthingDevStatus::Rejected; } else if (eventType == QLatin1String("DeviceResumed")) { paused = false; - // FIXME: correct to assume device which has just been resumed is still disconnected? - status = SyncthingDevStatus::Disconnected; } else if (eventType == QLatin1String("DeviceDiscovered")) { - // we know about this device already, set status anyways because it might still be unknown - if (status == SyncthingDevStatus::Unknown) { - status = SyncthingDevStatus::Disconnected; - } + return; // we know about this device already, nothing to do } else { return; // can't handle other event types currently }