Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Mail: MailRuleField (MailField is already a view)

Claude3c26a26dcee6
diff --git a/NotchBuddy/Sources/App/MailHubPages.swift b/NotchBuddy/Sources/App/MailHubPages.swift
index ceb5d747..edd6b139 100644
--- a/NotchBuddy/Sources/App/MailHubPages.swift
+++ b/NotchBuddy/Sources/App/MailHubPages.swift
@@ -188,7 +188,7 @@ extension MailReason {
}
}
-extension MailField {
+extension MailRuleField {
var title: String {
switch self {
case .sender: return String(localized: "hub.mail.field.sender")
@@ -220,7 +220,7 @@ private struct MailAutoSortHint: View {
struct HubMailRulesPage: View {
@ObservedObject private var store = MailTriageStore.shared
- @State private var field: MailField = .sender
+ @State private var field: MailRuleField = .sender
@State private var value = ""
@State private var kind: Kind = .junk
@State private var mailbox = ""
@@ -250,7 +250,7 @@ struct HubMailRulesPage: View {
.font(.system(size: 13, weight: .semibold))
.frame(width: 44, alignment: .leading)
Picker("", selection: $field) {
- ForEach(MailField.allCases, id: \.self) { f in Text(f.title).tag(f) }
+ ForEach(MailRuleField.allCases, id: \.self) { f in Text(f.title).tag(f) }
}
.labelsHidden()
.frame(width: 170)
diff --git a/NotchBuddy/Sources/App/MailTriage.swift b/NotchBuddy/Sources/App/MailTriage.swift
index 08f0e500..33f0512a 100644
--- a/NotchBuddy/Sources/App/MailTriage.swift
+++ b/NotchBuddy/Sources/App/MailTriage.swift
@@ -8,12 +8,12 @@ import Foundation
/// What a rule looks at. `contains` everywhere, ignoring case and accents; `domain` is the end
/// of the sender's address.
-enum MailField: String, Codable, CaseIterable, Sendable {
+enum MailRuleField: String, Codable, CaseIterable, Sendable {
case sender, domain, subject, text, account
}
struct MailCondition: Codable, Equatable, Sendable {
- var field: MailField
+ var field: MailRuleField
var value: String
}