Fix refreshing counter after switching the account

This commit is contained in:
Marcin Czachurski 2023-10-12 12:31:48 +02:00
parent 5cc7167336
commit 7e9fd97efd
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ struct VernissageApp: App {
} }
.navigationViewStyle(.stack) .navigationViewStyle(.stack)
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
DispatchQueue.main.asyncAfter(deadline: .now() + 2) { DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
Task { Task {
// Refresh indicator of new photos when application is become active. // Refresh indicator of new photos when application is become active.
await self.calculateNewPhotosInBackground() await self.calculateNewPhotosInBackground()
@ -135,7 +135,7 @@ struct VernissageApp: App {
return return
} }
self.setApplicationState(accountModel: signedInAccountModel) self.setApplicationState(accountModel: signedInAccountModel, checkNewPhotos: true)
} }
} }