File tree Expand file tree Collapse file tree 1 file changed +25
-11
lines changed
Cork/Views/Updating/Incremental Updating Expand file tree Collapse file tree 1 file changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -87,17 +87,6 @@ struct UpdateSomePackagesView: View
8787 {
8888 packageUpdatingStage = . finished
8989 }
90-
91- do
92- {
93- AppConstants . shared. logger. debug ( " Will synchronize outdated packages " )
94- try await outdatedPackageTracker. getOutdatedPackages ( brewData: brewData)
95- }
96- catch let packageSynchronizationError
97- {
98- AppConstants . shared. logger. error ( " Could not synchronize packages: \( packageSynchronizationError, privacy: . public) " )
99- appState. showAlert ( errorToShow: . couldNotSynchronizePackages( error: packageSynchronizationError. localizedDescription) )
100- }
10190 }
10291
10392 case . finished:
@@ -120,5 +109,30 @@ struct UpdateSomePackagesView: View
120109 }
121110 }
122111 . padding ( )
112+ . onDisappear
113+ {
114+ Task
115+ {
116+ do
117+ {
118+ appState. isCheckingForPackageUpdates = true
119+
120+ defer
121+ {
122+ appState. isCheckingForPackageUpdates = false
123+ }
124+
125+ AppConstants . shared. logger. debug ( " Will synchronize outdated packages " )
126+ try await outdatedPackageTracker. getOutdatedPackages ( brewData: brewData)
127+ }
128+ catch let packageSynchronizationError
129+ {
130+ AppConstants . shared. logger. error ( " Could not synchronize packages: \( packageSynchronizationError, privacy: . public) " )
131+
132+ appState. showAlert ( errorToShow: . couldNotSynchronizePackages( error: packageSynchronizationError. localizedDescription) )
133+
134+ }
135+ }
136+ }
123137 }
124138}
You can’t perform that action at this time.
0 commit comments