mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 16:26:04 +00:00
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:
1 parent
f1da9db918
commit
28a1ca85c3
1 file changed
+6
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user