Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Show that a Duplicates scan was stopped, as every other page does
Țugui Dragoș57da98135cdd
diff --git a/Peel/Model/DuplicateLibrary.swift b/Peel/Model/DuplicateLibrary.swiftindex 701a3eb9..c88ef811 100644--- a/Peel/Model/DuplicateLibrary.swift+++ b/Peel/Model/DuplicateLibrary.swift@@ -34,6 +34,8 @@ final class DuplicateLibrary {/// reports, or from the start when a kind is chosen, since folders are then not compared.private(set) var isOnFiles = falseprivate(set) var isScanning = false+ /// True when the last scan was stopped before it ended, so the page says so rather than offer a first scan.+ private(set) var wasStopped = falseprivate(set) var isRemoving = falsevar selection: DuplicateRow?private(set) var selectedURLs: Set<URL> = []@@ -129,6 +131,7 @@ final class DuplicateLibrary {scanTask?.cancel()generation += 1progress = nil+ if isScanning { wasStopped = true }isScanning = false}@@ -158,6 +161,7 @@ final class DuplicateLibrary {private func runScan(_ current: Int) async {clearResults()isScanning = true+ wasStopped = falseprogress = nilisOnFiles = kind != .anyvar options = DuplicateScanOptions(folders: folders)diff --git a/Peel/Views/Duplicates/DuplicateList.swift b/Peel/Views/Duplicates/DuplicateList.swiftindex 2e0aba58..7428f378 100644--- a/Peel/Views/Duplicates/DuplicateList.swift+++ b/Peel/Views/Duplicates/DuplicateList.swift@@ -99,6 +99,9 @@ struct DuplicateList: View {} else if duplicates.isScanning {DuplicateScanProgressView().centeredOnColumn()+ } else if duplicates.wasStopped {+ StoppedScan()+ .centeredOnColumn()} else {ContentUnavailableView {Label("Find Duplicate Files", systemImage: "doc.on.doc")diff --git a/Peel/Views/ScanState.swift b/Peel/Views/ScanState.swiftindex cc3a794b..6a88effd 100644--- a/Peel/Views/ScanState.swift+++ b/Peel/Views/ScanState.swift@@ -132,7 +132,7 @@ struct ReadSoFar: View {/// What a page shows when its first scan was stopped. Scan Again runs the toolbar's Rescan command, so the two/// always do the same thing.-private struct StoppedScan: View {+struct StoppedScan: View {var body: some View {ContentUnavailableView {Label("Scan Stopped", systemImage: "xmark.circle")