Fix refreshing counter after switching the account
This commit is contained in:
parent
5cc7167336
commit
7e9fd97efd
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue