mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
parent
ae2b23a6c4
commit
6422d0ef15
3 changed files with 26 additions and 19 deletions
|
@ -719,10 +719,17 @@
|
|||
if (![cell isKindOfClass:[FeedDetailTableCell class]]) return;
|
||||
if ([cell.storyImageUrl isEqualToString:imageUrl]) {
|
||||
NSIndexPath *indexPath = [self.storyTitlesTable indexPathForCell:cell];
|
||||
[self.storyTitlesTable beginUpdates];
|
||||
NSInteger numberOfRows = [self.storyTitlesTable numberOfRowsInSection:0];
|
||||
|
||||
if (indexPath.row >= numberOfRows) {
|
||||
NSLog(@"row %@ is greater than the number of rows: %@", @(indexPath.row), @(numberOfRows)); // log
|
||||
continue;
|
||||
}
|
||||
|
||||
// [self.storyTitlesTable beginUpdates];
|
||||
[self.storyTitlesTable reloadRowsAtIndexPaths:@[indexPath]
|
||||
withRowAnimation:UITableViewRowAnimationNone];
|
||||
[self.storyTitlesTable endUpdates];
|
||||
// [self.storyTitlesTable endUpdates];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1413,12 +1413,12 @@
|
|||
appDelegate.storyPagesViewController.traverseView.alpha = 1;
|
||||
// NSLog(@" ---> Bottom position: %d", bottomPosition);
|
||||
if (bottomPosition >= 0 || !isHorizontal) {
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin + 20;
|
||||
} else {
|
||||
if (webpageHeight > 0) {
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = viewportHeight - (webpageHeight - topPosition) + safeBottomMargin;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = viewportHeight - (webpageHeight - topPosition) + safeBottomMargin + 20;
|
||||
} else {
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin + 20;
|
||||
}
|
||||
}
|
||||
} else if (!singlePage && (atTop && !atBottom)) {
|
||||
|
@ -1427,7 +1427,7 @@
|
|||
appDelegate.storyPagesViewController.traverseFloating = NO;
|
||||
[appDelegate.storyPagesViewController.view layoutIfNeeded];
|
||||
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin + 20;
|
||||
[UIView animateWithDuration:.3 delay:0
|
||||
options:UIViewAnimationOptionCurveEaseInOut
|
||||
animations:^{
|
||||
|
@ -1440,7 +1440,7 @@
|
|||
appDelegate.storyPagesViewController.traverseFloating = YES;
|
||||
[appDelegate.storyPagesViewController.view layoutIfNeeded];
|
||||
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = safeBottomMargin + 20;
|
||||
[UIView animateWithDuration:.3 delay:0
|
||||
options:UIViewAnimationOptionCurveEaseInOut
|
||||
animations:^{
|
||||
|
@ -1453,7 +1453,7 @@
|
|||
appDelegate.storyPagesViewController.traversePinned = NO;
|
||||
appDelegate.storyPagesViewController.traverseFloating = YES;
|
||||
appDelegate.storyPagesViewController.traverseView.alpha = 1;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = viewportHeight - (webpageHeight - topPosition) + safeBottomMargin;
|
||||
appDelegate.storyPagesViewController.traverseBottomConstraint.constant = viewportHeight - (webpageHeight - topPosition) + safeBottomMargin + 20;
|
||||
}
|
||||
|
||||
[self storeScrollPosition:YES];
|
||||
|
|
|
@ -226,7 +226,7 @@
|
|||
self.traverseBottomConstraint.constant = 50;
|
||||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
|
||||
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||
appDelegate.detailViewController.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||
originalStoryButton,
|
||||
separatorBarButton,
|
||||
fontSettingsButton, nil];
|
||||
|
@ -327,8 +327,8 @@
|
|||
titleImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[titleImageViewWrapper addSubview:titleImageView];
|
||||
[titleImageViewWrapper setFrame:titleImageView.frame];
|
||||
if (!self.navigationItem.titleView) {
|
||||
self.navigationItem.titleView = titleImageViewWrapper;
|
||||
if (!appDelegate.detailViewController.navigationItem.titleView) {
|
||||
appDelegate.detailViewController.navigationItem.titleView = titleImageViewWrapper;
|
||||
}
|
||||
titleImageView.hidden = NO;
|
||||
} else {
|
||||
|
@ -344,7 +344,7 @@
|
|||
[titleImageView setImage:titleImage];
|
||||
[titleImageViewWrapper addSubview:titleImageView];
|
||||
[titleImageViewWrapper setFrame:titleImageView.frame];
|
||||
self.navigationItem.titleView = titleImageViewWrapper;
|
||||
appDelegate.detailViewController.navigationItem.titleView = titleImageViewWrapper;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,7 +354,7 @@
|
|||
self.isAnimatedIntoPlace = NO;
|
||||
currentPage.view.hidden = NO;
|
||||
|
||||
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc]
|
||||
self.navigationController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc]
|
||||
initWithTitle:@" "
|
||||
style:UIBarButtonItemStylePlain
|
||||
target:nil action:nil];
|
||||
|
@ -374,7 +374,7 @@
|
|||
[appDelegate.storiesCollection.activeFeed objectForKey:@"username"]) {
|
||||
self.subscribeButton.title = [NSString stringWithFormat:@"Follow %@",
|
||||
[appDelegate.storiesCollection.activeFeed objectForKey:@"username"]];
|
||||
self.navigationItem.leftBarButtonItem = self.subscribeButton;
|
||||
appDelegate.detailViewController.navigationItem.leftBarButtonItem = self.subscribeButton;
|
||||
// self.subscribeButton.tintColor = UIColorFromRGB(0x0a6720);
|
||||
}
|
||||
appDelegate.isTryFeedView = NO;
|
||||
|
@ -394,7 +394,7 @@
|
|||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
|
||||
self.navigationItem.leftBarButtonItem = nil;
|
||||
appDelegate.detailViewController.navigationItem.leftBarButtonItem = nil;
|
||||
|
||||
[self.navigationController.barHideOnSwipeGestureRecognizer removeTarget:self action:@selector(barHideSwipe:)];
|
||||
}
|
||||
|
@ -669,7 +669,7 @@
|
|||
}
|
||||
|
||||
- (void)resetPages {
|
||||
self.navigationItem.titleView = nil;
|
||||
appDelegate.detailViewController.navigationItem.titleView = nil;
|
||||
|
||||
[currentPage clearStory];
|
||||
[nextPage clearStory];
|
||||
|
@ -1060,7 +1060,7 @@
|
|||
traversePinned = YES;
|
||||
|
||||
if (!self.isPhoneOrCompact) {
|
||||
self.traverseBottomConstraint.constant = 0;
|
||||
self.traverseBottomConstraint.constant = 20;
|
||||
} else {
|
||||
self.traverseBottomConstraint.constant = -1 * self.view.safeAreaInsets.bottom/2;
|
||||
}
|
||||
|
@ -1311,12 +1311,12 @@
|
|||
|
||||
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
|
||||
if (appDelegate.detailViewController.storyTitlesOnLeft) {
|
||||
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||
appDelegate.detailViewController.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||
originalStoryButton,
|
||||
separatorBarButton,
|
||||
fontSettingsButton, nil];
|
||||
} else {
|
||||
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||
appDelegate.detailViewController.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:
|
||||
originalStoryButton,
|
||||
separatorBarButton,
|
||||
fontSettingsButton,
|
||||
|
|
Loading…
Add table
Reference in a new issue