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.

Say History's two notes on macOS 26 too

Țugui Dragoșe97e9aaf8b10
diff --git a/Peel/Views/History/HistoryDetailView.swift b/Peel/Views/History/HistoryDetailView.swift
index ee3b29b6..d52b3388 100644
--- a/Peel/Views/History/HistoryDetailView.swift
+++ b/Peel/Views/History/HistoryDetailView.swift
@@ -328,16 +328,12 @@ private struct HistoryRecordRow: View {
}
}
- /// VoiceOver hears the checkbox and not the lines under it, so on macOS 27 its hint says them too.
+ /// VoiceOver hears the checkbox and not the lines under it, so its hint says them too.
private var hint: String? {
- if #available(macOS 27, *) {
- let lines = notes.map { String(localized: $0.text) } + [failure?.explanation].compactMap { $0 }
- return lines.isEmpty ? nil : lines.joined(separator: " ")
- }
- return failure?.explanation
+ let lines = notes.map { String(localized: $0.text) } + [failure?.explanation].compactMap { $0 }
+ return lines.isEmpty ? nil : lines.joined(separator: " ")
}
- @available(macOS 27, *)
private var notes: [RecordNote] {
var notes: [RecordNote] = record.sharedStorage == true ? [.sharedStorage] : []
if place == .inTrash, AudioDrivers.isOne(record.originalURL) { notes.append(.loadsAfterARestart) }
@@ -358,12 +354,10 @@ private struct HistoryRecordRow: View {
Text(place.title)
.font(.caption)
.foregroundStyle(.secondary)
- if #available(macOS 27, *) {
- ForEach(notes, id: \.self) { note in
- Text(note.text)
- .font(.caption)
- .foregroundStyle(.secondary)
- }
+ ForEach(notes, id: \.self) { note in
+ Text(note.text)
+ .font(.caption)
+ .foregroundStyle(.secondary)
}
if let failure {
StatusLabel(title: Text(verbatim: failure.explanation))