diff --git a/Pearcleaner.xcodeproj/project.pbxproj b/Pearcleaner.xcodeproj/project.pbxproj index edea6bc..825deaa 100644 --- a/Pearcleaner.xcodeproj/project.pbxproj +++ b/Pearcleaner.xcodeproj/project.pbxproj @@ -560,8 +560,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - APP_BUILD = 34; - APP_VERSION = 3.5.0; + APP_BUILD = 35; + APP_VERSION = 3.5.1; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -630,8 +630,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - APP_BUILD = 34; - APP_VERSION = 3.5.0; + APP_BUILD = 35; + APP_VERSION = 3.5.1; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; diff --git a/Pearcleaner/Logic/Utilities.swift b/Pearcleaner/Logic/Utilities.swift index 4e0bccb..740f62b 100644 --- a/Pearcleaner/Logic/Utilities.swift +++ b/Pearcleaner/Logic/Utilities.swift @@ -374,6 +374,7 @@ func killApp(appId: String, completion: @escaping () -> Void = {}) { // Remove app from cache func removeApp(appState: AppState, withId id: UUID) { + @AppStorage("settings.general.brew") var brew: Bool = false DispatchQueue.main.async { // Remove from sortedApps if found if let index = appState.sortedApps.firstIndex(where: { $0.id == id }) { @@ -384,6 +385,10 @@ func removeApp(appState: AppState, withId id: UUID) { if let index = appState.appInfoStore.firstIndex(where: { $0.id == id }) { appState.appInfoStore.remove(at: index) } + // Brew cleanup if enabled + if brew { + caskCleanup(app: appState.appInfo.appName) + } } } diff --git a/Pearcleaner/Settings/General.swift b/Pearcleaner/Settings/General.swift index afa650e..52b8b5e 100644 --- a/Pearcleaner/Settings/General.swift +++ b/Pearcleaner/Settings/General.swift @@ -324,7 +324,7 @@ struct GeneralSettingsTab: View { } .padding(20) - .frame(width: 500, height: 600) + .frame(width: 500, height: 570) } diff --git a/Pearcleaner/Settings/Interface.swift b/Pearcleaner/Settings/Interface.swift index 71746d8..703f3a5 100644 --- a/Pearcleaner/Settings/Interface.swift +++ b/Pearcleaner/Settings/Interface.swift @@ -506,7 +506,7 @@ struct InterfaceSettingsTab: View { } .padding(20) - .frame(width: 500, height: 550) + .frame(width: 500, height: 570) } diff --git a/Pearcleaner/Views/FilesView.swift b/Pearcleaner/Views/FilesView.swift index e44aa4c..afae20b 100644 --- a/Pearcleaner/Views/FilesView.swift +++ b/Pearcleaner/Views/FilesView.swift @@ -295,11 +295,6 @@ struct FilesView: View { } } - // Brew cleanup if enabled - if brew { - caskCleanup(app: appState.appInfo.appName) - } - // Remove app from app list if main app bundle is removed if selectedItemsArray.contains(where: { $0.absoluteString == appState.appInfo.path.absoluteString }) { removeApp(appState: appState, withId: appState.appInfo.id)