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.

Let Remove Downloads say how far it got and stop on macOS 26

Țugui Dragoș73b65ba22ba0
diff --git a/Peel/Views/Cloud/CloudView.swift b/Peel/Views/Cloud/CloudView.swift
index cf60916a..722d1f2c 100644
--- a/Peel/Views/Cloud/CloudView.swift
+++ b/Peel/Views/Cloud/CloudView.swift
@@ -158,34 +158,19 @@ struct CloudView: View {
}
.edgeBar(.bottom) {
if cloud.files?.isEmpty == false {
- if #available(macOS 27, *) {
- RemovalBar(
- selectedSize: cloud.selectedSize,
- isScanning: cloud.isScanning,
- isWorking: cloud.isFreeing,
- scan: cloud.scanRun,
- isEnabled: cloud.selectedSize > 0 && !cloud.isFreeing,
- onRemove: { isConfirming = true },
- title: "Remove Downloads",
- systemImage: "icloud.and.arrow.down",
- notice: freed,
- removal: (cloud.freeing, cloud.stopFreeing),
- recordsInHistory: false
- )
- } else {
- RemovalBar(
- selectedSize: cloud.selectedSize,
- isScanning: cloud.isScanning,
- isWorking: cloud.isFreeing,
- scan: cloud.scanRun,
- isEnabled: cloud.selectedSize > 0 && !cloud.isFreeing,
- onRemove: { isConfirming = true },
- title: "Remove Downloads",
- systemImage: "icloud.and.arrow.down",
- notice: freed,
- recordsInHistory: false
- )
- }
+ RemovalBar(
+ selectedSize: cloud.selectedSize,
+ isScanning: cloud.isScanning,
+ isWorking: cloud.isFreeing,
+ scan: cloud.scanRun,
+ isEnabled: cloud.selectedSize > 0 && !cloud.isFreeing,
+ onRemove: { isConfirming = true },
+ title: "Remove Downloads",
+ systemImage: "icloud.and.arrow.down",
+ notice: freed,
+ removal: (cloud.freeing, cloud.stopFreeing),
+ recordsInHistory: false
+ )
}
}
.fadesInColumn(whenRowsChange: cloud.files?.map(\.id))
diff --git a/Peel/Views/RemovalBar.swift b/Peel/Views/RemovalBar.swift
index 1e678bfa..6038ac27 100644
--- a/Peel/Views/RemovalBar.swift
+++ b/Peel/Views/RemovalBar.swift
@@ -37,7 +37,7 @@ struct RemovalBar: View {
var progress: MoveProgress?
/// The apps the page's removal waits for to quit.
var waitingToQuit: String?
- /// iCloud Drive's Remove Downloads: on macOS 27 the spinner says how far it got, and the button stops it.
+ /// iCloud Drive's Remove Downloads: the spinner says how far it got, and the button stops it.
var removal: (progress: MoveProgress, stop: () -> Void)?
/// False for an action History doesn't record, such as freeing iCloud downloads: it then waits only for the
/// exclusions, and the bar never shows what History just moved.
@@ -172,7 +172,7 @@ struct RemovalBar: View {
if isShowingScan {
ReadSoFar(scan: scan)
.foregroundStyle(.secondary)
- } else if #available(macOS 27, *), let removal, removal.progress.isMoving {
+ } else if let removal, removal.progress.isMoving {
Text("Removed \(removal.progress.moved, format: .number) of \(removal.progress.toMove, format: .number)")
.monospacedDigit()
.foregroundStyle(.secondary)
@@ -218,7 +218,7 @@ struct RemovalBar: View {
.foregroundStyle(.secondary)
}
} action: {
- if #available(macOS 27, *), isShowingWork, let removal, removal.progress.isMoving {
+ if isShowingWork, let removal, removal.progress.isMoving {
Button("Stop", systemImage: "xmark", action: removal.stop)
.help(Text("Stop removing downloads"))
} else {