Skip to content

Commit

Permalink
fix: "Restone from iCloud" btn stuck on loading
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldavidw committed Jun 23, 2024
1 parent 5a86e87 commit db24aaf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Chronos/App/Onboarding/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ struct WelcomeView: View {
.onAppear(perform: {
swiftDataService.resetModelContainers()
iCloudSyncLastAttempt = 0

if syncMonitor.syncStateSummary == .succeeded {
syncTimer = Timer.scheduledTimer(withTimeInterval: 2, repeats: false) { _ in
hasSynced = true
}
}
})
.onChange(of: syncMonitor.syncStateSummary) { _, newValue in
syncTimer?.invalidate()
Expand Down

0 comments on commit db24aaf

Please sign in to comment.