#1903 (Saved searches don't work)

- Fixed saved searches not appearing (and probably other misbehavior due to the viewWill/DidAppear not getting called); affected both Mac and iPad.
- Fixed the icon for the Delete Saved Search command.
This commit is contained in:
David Sinclair 2024-10-23 18:54:53 -07:00
parent 33b7150ea8
commit 9e681dd3dd
2 changed files with 17 additions and 2 deletions

View file

@ -1973,6 +1973,11 @@ typedef NS_ENUM(NSUInteger, FeedSection)
[appDelegate showColumn:UISplitViewControllerColumnSecondary debugInfo:@"tap selected row"]; [appDelegate showColumn:UISplitViewControllerColumnSecondary debugInfo:@"tap selected row"];
if (!appDelegate.isPhone) {
[appDelegate.storyPagesViewController viewWillAppear:NO];
[appDelegate.storyPagesViewController viewDidAppear:NO];
}
if (!isGrid) { if (!isGrid) {
return; return;
} }
@ -2499,11 +2504,11 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
if (storiesCollection.inSearch) { if (storiesCollection.inSearch) {
if (storiesCollection.savedSearchQuery == nil) { if (storiesCollection.savedSearchQuery == nil) {
[viewController addTitle:@"Save search" iconName:@"search" selectionShouldDismiss:YES handler:^{ [viewController addTitle:@"Save search" iconName:@"g_icn_search.png" selectionShouldDismiss:YES handler:^{
[self saveSearch]; [self saveSearch];
}]; }];
} else { } else {
[viewController addTitle:@"Delete saved search" iconName:@"search" selectionShouldDismiss:YES handler:^{ [viewController addTitle:@"Delete saved search" iconName:@"g_icn_search.png" selectionShouldDismiss:YES handler:^{
[self deleteSavedSearch]; [self deleteSavedSearch];
}]; }];
} }

View file

@ -1722,6 +1722,11 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
appDelegate.storiesCollection.searchQuery = searchQuery; appDelegate.storiesCollection.searchQuery = searchQuery;
appDelegate.storiesCollection.savedSearchQuery = searchQuery; appDelegate.storiesCollection.savedSearchQuery = searchQuery;
} }
if (!appDelegate.isPhone) {
[appDelegate.feedDetailViewController viewWillAppear:NO];
[appDelegate.feedDetailViewController viewDidAppear:NO];
}
} }
- (CGFloat)tableView:(UITableView *)tableView - (CGFloat)tableView:(UITableView *)tableView
@ -1996,6 +2001,11 @@ heightForHeaderInSection:(NSInteger)section {
} }
[appDelegate loadRiverFeedDetailView:appDelegate.feedDetailViewController withFolder:folder]; [appDelegate loadRiverFeedDetailView:appDelegate.feedDetailViewController withFolder:folder];
if (!appDelegate.isPhone) {
[appDelegate.feedDetailViewController viewWillAppear:NO];
[appDelegate.feedDetailViewController viewDidAppear:NO];
}
} }
- (NSArray *)allIndexPaths { - (NSArray *)allIndexPaths {