Support for maxPages to be able to skip possible empty last pages

This commit is contained in:
Sebastián Katzer 2019-01-24 12:08:38 +01:00
parent ea223c3609
commit 783cc42613

View File

@ -66,6 +66,14 @@
return self; return self;
} }
- (NSInteger) numberOfPages
{
NSInteger num = [super numberOfPages];
id maxPages = _settings[@"maxPages"];
return maxPages ? MIN(num, [maxPages longValue]) : num;
}
#pragma mark - #pragma mark -
#pragma mark Callbacks #pragma mark Callbacks