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 in comments that the menu bar panel lists what each tool found

Țugui Dragoșf45d22b3c0d3
diff --git a/Packages/PeelCore/Sources/PeelCore/Home/FoundLastTime.swift b/Packages/PeelCore/Sources/PeelCore/Home/FoundLastTime.swift
index 37ec016c..2168631e 100644
--- a/Packages/PeelCore/Sources/PeelCore/Home/FoundLastTime.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Home/FoundLastTime.swift
@@ -1,7 +1,7 @@
public import Foundation
-/// What each tool found the last time it looked, kept so Home can say it after Peel is opened again. The app names
-/// the tools.
+/// What each tool found the last time it looked, kept so the menu bar panel can say it after Peel is opened again.
+/// The app names the tools.
public struct FoundLastTime: Sendable, Equatable {
public struct Finding: Sendable, Equatable {
public let count: Int
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/FoundLastTimeTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/FoundLastTimeTests.swift
index fb58ae9b..6a78812e 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/FoundLastTimeTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/FoundLastTimeTests.swift
@@ -2,7 +2,7 @@ import Foundation
@testable import PeelCore
import Testing
-/// Home lists what each tool found the last time it looked, from what Peel kept in its preferences.
+/// The menu bar panel lists what each tool found the last time it looked, from what Peel kept in its preferences.
struct FoundLastTimeTests {
private let monday = Date(timeIntervalSinceReferenceDate: 800_000_000)
private let tuesday = Date(timeIntervalSinceReferenceDate: 800_086_400)
diff --git a/Peel/Model/FoundLastTimeStore.swift b/Peel/Model/FoundLastTimeStore.swift
index 9967d403..3754fae2 100644
--- a/Peel/Model/FoundLastTimeStore.swift
+++ b/Peel/Model/FoundLastTimeStore.swift
@@ -2,7 +2,7 @@ import Foundation
import Observation
import PeelCore
-/// What each tool found the last time it looked, kept in the app's user defaults so Home can list it.
+/// What each tool found the last time it looked, kept in the app's user defaults so the menu bar panel can list it.
@Observable
final class FoundLastTimeStore {
private static let key = "home.foundLastTime"
diff --git a/Peel/PeelApp.swift b/Peel/PeelApp.swift
index 813cc52a..bad1441b 100644
--- a/Peel/PeelApp.swift
+++ b/Peel/PeelApp.swift
@@ -231,8 +231,8 @@ struct PeelApp: App {
}
}
- /// Records what each tool finds, its page open or not, so Home can list it. Each tool is followed on its own, so
- /// one that looks again leaves the others' dates as they were.
+ /// Records what each tool finds, its page open or not, so the menu bar panel can list it. Each tool is followed on
+ /// its own, so one that looks again leaves the others' dates as they were.
private func followFindings() async {
let tools: [(Tool, @MainActor @Sendable () -> Looked?)] = [
(.applications, { [library] in library.looked }),
diff --git a/Peel/Views/ToolSummaries.swift b/Peel/Views/ToolSummaries.swift
index 64737be4..595d094a 100644
--- a/Peel/Views/ToolSummaries.swift
+++ b/Peel/Views/ToolSummaries.swift
@@ -9,7 +9,8 @@ import SwiftUI
// total comes first because `SizeTotal.text` ("Over X") is written to stand on its own.
extension Tool {
- /// What the tool found, as its pane says it and Home repeats it, or nil for a tool with no such sentence.
+ /// What the tool found, as its page says it and the menu bar panel repeats it, or nil for a tool with no such
+ /// sentence.
func sentence(for looked: Looked) -> AttributedString? {
let count = looked.count
let total = looked.size.flatMap { $0.known > 0 ? $0.text : nil }