From 2ccd325fec6ffb4fb5f58f37382ac1a04d63f240 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Wed, 20 May 2026 14:06:59 -0700 Subject: [PATCH] Fix iPhone crash on cross-feed Next Unread by waiting for in-flight nav transition before pushing article. --- iOS/SceneCoordinator.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 26d14e826..e9b5997df 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -1176,7 +1176,18 @@ struct SidebarItemNode: Hashable, Sendable { } selectNextUnreadFeed { - self.selectNextUnreadArticleInTimeline() + // The supplementary push from selectSidebarItem may still be animating when + // this completion fires — the async data fetch can outrun the push animation + // in compact mode. Wait for the in-flight transition before pushing the + // article view controller, or UIKit aborts with NSInternalInconsistencyException + // from -[UINavigationController pushViewController:transition:forceImmediate:]. + if let coordinator = self.mainTimelineViewController?.navigationController?.transitionCoordinator { + coordinator.animate(alongsideTransition: nil) { _ in + self.selectNextUnreadArticleInTimeline() + } + } else { + self.selectNextUnreadArticleInTimeline() + } } }