Allow negative values for maxPages
maxPages: -1 means to skip the last page
This commit is contained in:
parent
783cc42613
commit
98b5d32527
@ -71,7 +71,12 @@
|
|||||||
NSInteger num = [super numberOfPages];
|
NSInteger num = [super numberOfPages];
|
||||||
id maxPages = _settings[@"maxPages"];
|
id maxPages = _settings[@"maxPages"];
|
||||||
|
|
||||||
return maxPages ? MIN(num, [maxPages longValue]) : num;
|
if (maxPages < 0)
|
||||||
|
{
|
||||||
|
return MAX(1, num + [maxPages longValue]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return maxPages ? MAX(1, MIN(num, [maxPages longValue])) : num;
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark -
|
#pragma mark -
|
||||||
|
Loading…
Reference in New Issue
Block a user