[plugins/photo] Remove requests from queue when cancel packet is received

This commit is contained in:
Nicolas Fella 2019-07-20 13:42:50 +00:00
parent 2ca09a5ec1
commit 43cac10b6a

View file

@ -43,6 +43,10 @@ PhotoPlugin::~PhotoPlugin()
bool PhotoPlugin::receivePacket(const NetworkPacket& np)
{
if (np.get<bool>(QStringLiteral("cancel"))) {
requestedFiles.takeFirst();
}
if (requestedFiles.isEmpty() || !np.hasPayload()) {
return true;
}