mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
iOS: fixed #1166 (keyboard shortcut story skipping)
Easy enough fix. Can’t trust the nextPage.pageIndex, as the view may not have been reused yet in the middle of scrolling.
This commit is contained in:
parent
d86e0b5234
commit
eb7b049679
1 changed files with 8 additions and 7 deletions
|
@ -1025,23 +1025,24 @@
|
|||
}
|
||||
|
||||
- (void)changeToNextPage:(id)sender {
|
||||
NSInteger nextPageIndex = nextPage.pageIndex;
|
||||
if (nextPageIndex < 0 && currentPage.pageIndex < 0) {
|
||||
if (nextPage.pageIndex < 0 && currentPage.pageIndex < 0) {
|
||||
// just displaying a placeholder - display the first story instead
|
||||
[self changePage:0 animated:YES];
|
||||
return;
|
||||
}
|
||||
[self changePage:nextPageIndex animated:YES];
|
||||
|
||||
[self changePage:currentPage.pageIndex + 1 animated:YES];
|
||||
}
|
||||
|
||||
- (void)changeToPreviousPage:(id)sender {
|
||||
NSInteger previousPageIndex = previousPage.pageIndex;
|
||||
if (previousPageIndex < 0) {
|
||||
if (currentPage.pageIndex < 0)
|
||||
if (previousPage.pageIndex < 0) {
|
||||
if (currentPage.pageIndex < 0) {
|
||||
[self changeToNextPage:sender];
|
||||
}
|
||||
return;
|
||||
}
|
||||
[self changePage:previousPageIndex animated:YES];
|
||||
|
||||
[self changePage:currentPage.pageIndex - 1 animated:YES];
|
||||
}
|
||||
|
||||
- (void)setStoryFromScroll {
|
||||
|
|
Loading…
Add table
Reference in a new issue