Update home unread counts after sync
This commit is contained in:
parent
533bc025f3
commit
c65b69cfbd
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue