Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

A scan that could not look is not announced as Nothing found

Țugui Dragoș24cb344bdf6e
diff --git a/Peel/Views/Extensions/ExtensionList.swift b/Peel/Views/Extensions/ExtensionList.swift
index 3d4e9117..fbe46fb0 100644
--- a/Peel/Views/Extensions/ExtensionList.swift
+++ b/Peel/Views/Extensions/ExtensionList.swift
@@ -52,7 +52,12 @@ struct ExtensionList: View {
}
.fadesInColumn(whenRowsChange: extensions.extensions?.map(\.id))
.navigationTitle(Text(Tool.extensions.title))
- .announcesScan(extensions.isScanning, found: extensions.summary, wasStopped: extensions.scanRun.wasStopped)
+ .announcesScan(
+ extensions.isScanning,
+ found: extensions.summary,
+ couldNotLook: extensions.unanswered.isEmpty ? nil : "macOS Didn’t Answer",
+ wasStopped: extensions.scanRun.wasStopped
+ )
.toolbar {
ToolbarItem {
RescanButton(isRunning: $isRescanning, scan: extensions.scanRun) {
diff --git a/Peel/Views/Homebrew/HomebrewList.swift b/Peel/Views/Homebrew/HomebrewList.swift
index 60cb377c..956010d7 100644
--- a/Peel/Views/Homebrew/HomebrewList.swift
+++ b/Peel/Views/Homebrew/HomebrewList.swift
@@ -35,7 +35,13 @@ struct HomebrewList: View {
.columnSearch(text: $searchText, prompt: "Search Homebrew", when: homebrew.packages?.isEmpty == false)
.fadesInColumn(whenRowsChange: homebrew.packages?.map(\.id))
.navigationTitle(Text(Tool.homebrew.title))
- .announcesScan(homebrew.isScanning, found: homebrew.summary, wasStopped: homebrew.scanRun.wasStopped)
+ .announcesScan(
+ homebrew.isScanning,
+ found: homebrew.summary,
+ couldNotLook: !homebrew.isInstalled ? "Homebrew Isn’t Installed"
+ : homebrew.needsDefinitions ? "Homebrew Has to Update First" : nil,
+ wasStopped: homebrew.scanRun.wasStopped
+ )
.toolbar {
ToolbarItem {
RescanButton(isRunning: $isRescanning, isDisabled: !homebrew.isInstalled || homebrew.runningCommand != nil, scan: homebrew.scanRun) {
diff --git a/Peel/Views/Orphans/OrphanList.swift b/Peel/Views/Orphans/OrphanList.swift
index 6a1bf352..c10698ee 100644
--- a/Peel/Views/Orphans/OrphanList.swift
+++ b/Peel/Views/Orphans/OrphanList.swift
@@ -37,7 +37,12 @@ struct OrphanList: View {
.columnSearch(text: $searchText, prompt: "Search Orphaned Files", when: orphans.scan?.groups.isEmpty == false)
.fadesInColumn(whenRowsChange: orphans.scan?.groups.map(\.id))
.navigationTitle(Text(Tool.orphans.title))
- .announcesScan(orphans.isScanning, found: orphans.summary, wasStopped: orphans.scanRun.wasStopped)
+ .announcesScan(
+ orphans.isScanning,
+ found: orphans.summary,
+ couldNotLook: orphans.scan?.unreadableLocations.isEmpty == false ? "Not Everything Could Be Read" : nil,
+ wasStopped: orphans.scanRun.wasStopped
+ )
.toolbar {
ToolbarItem {
RescanButton(isRunning: $isRescanning, isDisabled: !library.hasLoaded || orphans.isRemoving, scan: orphans.scanRun) {
diff --git a/Peel/Views/Packages/PackageList.swift b/Peel/Views/Packages/PackageList.swift
index 5f50deab..b9a72885 100644
--- a/Peel/Views/Packages/PackageList.swift
+++ b/Peel/Views/Packages/PackageList.swift
@@ -57,7 +57,12 @@ struct PackageList: View {
.columnSearch(text: $searchText, prompt: "Search Package Receipts", when: packages.receipts?.isEmpty == false)
.fadesInColumn(whenRowsChange: packages.receipts?.map(\.id))
.navigationTitle(Text(Tool.packages.title))
- .announcesScan(packages.isScanning, found: packages.summary, wasStopped: packages.scanRun.wasStopped)
+ .announcesScan(
+ packages.isScanning,
+ found: packages.summary,
+ couldNotLook: packages.couldNotAsk ? "macOS Didn’t Answer" : nil,
+ wasStopped: packages.scanRun.wasStopped
+ )
.toolbar {
ToolbarItem {
RescanButton(isRunning: $isRescanning, isDisabled: packages.isWorking, scan: packages.scanRun) {
diff --git a/Peel/Views/Projects/ProjectList.swift b/Peel/Views/Projects/ProjectList.swift
index 7c034924..74115d62 100644
--- a/Peel/Views/Projects/ProjectList.swift
+++ b/Peel/Views/Projects/ProjectList.swift
@@ -86,7 +86,13 @@ struct ProjectList: View {
}
.fadesInColumn(whenRowsChange: projects.groups?.map(\.id))
.navigationTitle(Text(Tool.projects.title))
- .announcesScan(projects.isScanning, found: projects.summary, wasStopped: projects.scanRun.wasStopped)
+ .announcesScan(
+ projects.isScanning,
+ found: projects.summary,
+ couldNotLook: projects.folders.isEmpty ? "No Folders Yet"
+ : projects.needsFullDiskAccess ? "Not Everything Could Be Read" : nil,
+ wasStopped: projects.scanRun.wasStopped
+ )
.toolbar {
ToolbarItem {
Menu {