Commit 2c131e8d authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

KNS: Don't add the fallback screenshot if it's already present

parent bdbe226d
......@@ -166,10 +166,12 @@ QString KNSResource::section()
static void appendIfValid(QList<QUrl>& list, const QUrl &value, const QUrl &fallback = {})
{
if (value.isValid() && !value.isEmpty() && !list.contains(value))
list << value;
else if (!fallback.isEmpty())
appendIfValid(list, fallback);
if (list.contains(value)) {
if (value.isValid() && !value.isEmpty())
list << value;
else if (!fallback.isEmpty())
appendIfValid(list, fallback);
}
}
void KNSResource::fetchScreenshots()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment