mirror of
https://github.com/exituser/Pearcleaner.git
synced 2026-09-17 09:38:51 +00:00
v3.5.1
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user