Revision: 29246 http://sourceforge.net/p/bibdesk/svn/29246 Author: hofman Date: 2025-04-30 15:02:32 +0000 (Wed, 30 Apr 2025) Log Message: ----------- don't calculated requested number twice
Modified Paths: -------------- trunk/bibdesk/BDSKSRUGroupServer.m Modified: trunk/bibdesk/BDSKSRUGroupServer.m =================================================================== --- trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-30 14:56:23 UTC (rev 29245) +++ trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-30 15:02:32 UTC (rev 29246) @@ -239,18 +239,16 @@ } - (void)fetch { - if ([self numberOfAvailableResults] <= [self numberOfFetchedResults]) { + requestedResults = MIN([self numberOfAvailableResults] - [self numberOfFetchedResults], MAX_RESULTS); + + if (requestedResults == 0) { downloadState = BDSKSRUStateIdle; [group addPublications:@[]]; return; } - requestedResults = MIN([self numberOfAvailableResults] - [self numberOfFetchedResults], MAX_RESULTS); - - NSRange returnRange = NSMakeRange([self numberOfFetchedResults], requestedResults); - downloadState = BDSKSRUStateRetrieve; - [self startDownloadForRange:returnRange]; + [self startDownloadForRange:NSMakeRange([self numberOfFetchedResults], requestedResults)]; } #pragma mark Downloading This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit