Update home unread counts after sync
This commit is contained in:
parent
533bc025f3
commit
c65b69cfbd
|
@ -149,9 +149,17 @@ class HomeViewController: UIViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func syncStateChanged(_ newState: FervorController.SyncState) {
|
private func syncStateChanged(_ newState: FervorController.SyncState) {
|
||||||
if newState == .done && syncStateView == nil {
|
if newState == .done {
|
||||||
|
// 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
|
return
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func updateView(_ syncStateView: SyncStateView) {
|
func updateView(_ syncStateView: SyncStateView) {
|
||||||
switch newState {
|
switch newState {
|
||||||
|
|
Loading…
Reference in New Issue