Guard background file info retrieval to prevent it in case only a single entry was added

This commit is contained in:
Christopher Snowhill 2020-02-17 19:49:28 -08:00
parent 7308aa5f7b
commit 0f543a1b52

View file

@ -469,7 +469,8 @@ NSMutableDictionary * dictionaryWithPropertiesOfObject(id obj, NSArray * filterL
[restOfEntries removeObjectAtIndex:0]; [restOfEntries removeObjectAtIndex:0];
[self performSelectorOnMainThread:@selector(syncLoadInfoForEntries:) withObject:firstEntry waitUntilDone:YES]; [self performSelectorOnMainThread:@selector(syncLoadInfoForEntries:) withObject:firstEntry waitUntilDone:YES];
[self performSelectorInBackground:@selector(loadInfoForEntries:) withObject:restOfEntries]; if ([restOfEntries count])
[self performSelectorInBackground:@selector(loadInfoForEntries:) withObject:restOfEntries];
return entries; return entries;
} }