diff --git a/clients/ios/Classes/FeedDetailObjCViewController.m b/clients/ios/Classes/FeedDetailObjCViewController.m index 77566e89f..54c938d09 100644 --- a/clients/ios/Classes/FeedDetailObjCViewController.m +++ b/clients/ios/Classes/FeedDetailObjCViewController.m @@ -2300,7 +2300,7 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state } } - if (!everything && !infrequent && !saved && !read && !social && !widget) { + if ((!everything || !appDelegate.storiesCollection.isRiverView) && !infrequent && !saved && !read && !social && !widget) { NSString *manageText = [NSString stringWithFormat:@"Manage this %@", appDelegate.storiesCollection.isRiverView ? @"folder" : @"site"]; [viewController addTitle:manageText iconName:@"menu_icn_move.png" selectionShouldDismiss:NO handler:^{ @@ -2489,7 +2489,7 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state __weak MenuViewController *weakViewController = viewController; viewController.title = manageText; - if (!everything) { + if (!everything || !appDelegate.storiesCollection.isRiverView) { NSString *deleteText = [NSString stringWithFormat:@"Delete %@", appDelegate.storiesCollection.isRiverView ? @"this entire folder" : diff --git a/clients/ios/Classes/FeedsObjCViewController.m b/clients/ios/Classes/FeedsObjCViewController.m index 74c996ed0..c3fd00a41 100644 --- a/clients/ios/Classes/FeedsObjCViewController.m +++ b/clients/ios/Classes/FeedsObjCViewController.m @@ -1476,13 +1476,21 @@ static NSArray *NewsBlurTopSectionNames; count = limit; } +// NSLog(@"Folder %@ contains %@ feeds", folderName, @(count)); // log + return count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *folderName = [appDelegate.dictFoldersArray objectAtIndex:indexPath.section]; - id feedId = [[appDelegate.dictFolders objectForKey:folderName] objectAtIndex:indexPath.row]; + NSArray *folder = [appDelegate.dictFolders objectForKey:folderName]; + + if (indexPath.row >= folder.count) { + NSLog(@"Detected attempt to access row %@ of %@ when there are only %@; this will crash!", @(indexPath.row), folderName, @(folder.count)); // log + } + + id feedId = [folder objectAtIndex:indexPath.row]; NSString *feedIdStr = [NSString stringWithFormat:@"%@",feedId]; BOOL isSavedSearch = [appDelegate isSavedSearch:feedIdStr]; NSString *searchQuery = [appDelegate searchQueryForFeedId:feedIdStr];