mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 08:42:51 +00:00
Defer the pending article page flush until the swipe transition has finished, to avoid a UIKit assertion crash. Fixes #5384.
This commit is contained in:
1 parent
d1829e4983
commit
00efcc2bcf
1 file changed
+9
-1
@@ -525,7 +525,15 @@ extension ArticleViewController: UIPageViewControllerDelegate {
|
||||
|
||||
if let pending = pendingSetViewController {
|
||||
pendingSetViewController = nil
|
||||
pageViewController.setViewControllers([pending], direction: .forward, animated: false, completion: nil)
|
||||
// Async because UIKit is still finishing the swipe — a synchronous
|
||||
// setViewControllers here triggers an assertion in _UIQueuingScrollView.
|
||||
DispatchQueue.main.async {
|
||||
if self.isPageTransitionInProgress {
|
||||
self.pendingSetViewController = pending
|
||||
} else {
|
||||
self.pageViewController.setViewControllers([pending], direction: .forward, animated: false, completion: nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
guard finished, completed else { return }
|
||||
|
||||
Reference in new issue
Block a user