From 873c9398fe7a87adaae0113e797c6552d2f52ea2 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Tue, 11 Aug 2026 20:00:07 -0700 Subject: [PATCH] =?UTF-8?q?Fix=20overlapping=20and=20misplaced=20sidebar?= =?UTF-8?q?=20rows=20when=20toggling=20Hide=20Read=20Feeds=20=E2=80=94=20u?= =?UTF-8?q?se=20stable=20content-based=20identity=20for=20diffable=20items?= =?UTF-8?q?=20instead=20of=20recyclable=20Node=20object=20identity.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/SceneCoordinator.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 859a251aa..fcfeb3ebb 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -31,18 +31,23 @@ enum ShowFeedName { struct SidebarItemNode: Hashable, Sendable { let node: Node let sidebarItemID: SidebarItemIdentifier + // The parent scoping keeps identifiers distinct when the same feed + // appears in more than one folder. + let parentContainerID: ContainerIdentifier? @MainActor init(_ node: Node) { self.node = node self.sidebarItemID = (node.representedObject as! SidebarItem).sidebarItemID! + self.parentContainerID = (node.parent?.representedObject as? ContainerIdentifiable)?.containerID } nonisolated func hash(into hasher: inout Hasher) { - hasher.combine(ObjectIdentifier(node)) + hasher.combine(sidebarItemID) + hasher.combine(parentContainerID) } nonisolated static func == (lhs: SidebarItemNode, rhs: SidebarItemNode) -> Bool { - lhs.node === rhs.node + lhs.sidebarItemID == rhs.sidebarItemID && lhs.parentContainerID == rhs.parentContainerID } }