mirror of
https://github.com/exituser/Pearcleaner.git
synced 2026-09-17 07:19:04 +00:00
Updates
This commit is contained in:
@@ -156,16 +156,8 @@ struct AppListItems: View {
|
||||
}
|
||||
.onAppear {
|
||||
if self.bundleSize == 0 {
|
||||
DispatchQueue.global(qos: .userInitiated).async {
|
||||
let size = totalSizeOnDisk(for: appInfo.path).logical
|
||||
DispatchQueue.main.async {
|
||||
print("Sizing up")
|
||||
self.bundleSize = size
|
||||
// Update the appInfo in the appState array
|
||||
if let index = appState.sortedApps.firstIndex(where: { $0.path == appInfo.path }) {
|
||||
appState.sortedApps[index].bundleSize = size
|
||||
}
|
||||
}
|
||||
appState.getBundleSize(for: appInfo) { size in
|
||||
self.bundleSize = size
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user