From c9b12a6b7088de7f1430a399ed561abbd9d7c483 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Tue, 11 Jan 2022 14:23:19 -0500 Subject: [PATCH] Update unread counts when returning to home --- Reader/Screens/Home/HomeViewController.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Reader/Screens/Home/HomeViewController.swift b/Reader/Screens/Home/HomeViewController.swift index 300a282..cf8570f 100644 --- a/Reader/Screens/Home/HomeViewController.swift +++ b/Reader/Screens/Home/HomeViewController.swift @@ -79,6 +79,11 @@ class HomeViewController: UIViewController { collectionView.deselectItem(at: indexPath, animated: true) } } + + var snapshot = dataSource.snapshot() + // reconfigure so that unread counts update + snapshot.reconfigureItems(snapshot.itemIdentifiers) + dataSource.apply(snapshot) } private func createDataSource() -> UICollectionViewDiffableDataSource {