From 7e9fd97efde0adebec3c26d69bcd26e98e2d1e8d Mon Sep 17 00:00:00 2001 From: Marcin Czachurski Date: Thu, 12 Oct 2023 12:31:48 +0200 Subject: [PATCH] Fix refreshing counter after switching the account --- Vernissage/VernissageApp.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Vernissage/VernissageApp.swift b/Vernissage/VernissageApp.swift index ae64589..4517ea8 100644 --- a/Vernissage/VernissageApp.swift +++ b/Vernissage/VernissageApp.swift @@ -62,7 +62,7 @@ struct VernissageApp: App { } .navigationViewStyle(.stack) .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in - DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + DispatchQueue.main.asyncAfter(deadline: .now() + 5) { Task { // Refresh indicator of new photos when application is become active. await self.calculateNewPhotosInBackground() @@ -135,7 +135,7 @@ struct VernissageApp: App { return } - self.setApplicationState(accountModel: signedInAccountModel) + self.setApplicationState(accountModel: signedInAccountModel, checkNewPhotos: true) } }