mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
#1771 (cannot delete or move top level feed)
- Fixed. - Investigating wacky situation where the table could attempt to access an out-of-range cell.
This commit is contained in:
parent
c1c96d1a1e
commit
c95bf08a5f
2 changed files with 11 additions and 3 deletions
|
@ -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" :
|
||||
|
|
|
@ -1476,13 +1476,21 @@ static NSArray<NSString *> *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];
|
||||
|
|
Loading…
Add table
Reference in a new issue