Update home unread counts after sync

This commit is contained in:
Shadowfacts 2022-03-08 12:00:08 -05:00
parent 533bc025f3
commit c65b69cfbd
1 changed files with 10 additions and 2 deletions

View File

@ -149,8 +149,16 @@ class HomeViewController: UIViewController {
} }
private func syncStateChanged(_ newState: FervorController.SyncState) { private func syncStateChanged(_ newState: FervorController.SyncState) {
if newState == .done && syncStateView == nil { if newState == .done {
return // update unread counts for visible items
var snapshot = dataSource.snapshot()
snapshot.reconfigureItems(snapshot.itemIdentifiers)
dataSource.apply(snapshot, animatingDifferences: false)
if syncStateView == nil {
// no sync state view, nothing further to update
return
}
} }
func updateView(_ syncStateView: SyncStateView) { func updateView(_ syncStateView: SyncStateView) {