Fixed bug that could cause the wrong feed to be displayed in the timeline — we were checking for indexpath and not feed identity.

This commit is contained in:
Brent Simmons committed 2026-01-21 14:37:52 -08:00
1 parent f1da9db918
commit 28a1ca85c3
1 file changed
+6 -1
+6 -1
View File
@@ -917,7 +917,12 @@ struct SidebarItemNode: Hashable, Sendable {
func selectSidebarItem(indexPath: IndexPath?, animations: Animations = [], deselectArticle: Bool = true, completion: (() -> Void)? = nil) {
Self.logger.debug("SceneCoordinator: selectSidebarItem")
guard indexPath != currentFeedIndexPath else {
// Compare by feed identity, not indexPath — indexPath can change when feeds are added/removed
var tappedFeed: AnyObject?
if let indexPath {
tappedFeed = nodeFor(indexPath)?.representedObject as AnyObject?
}
guard tappedFeed !== timelineFeed as AnyObject? else {
completion?()
return
}