From 57abfdc2ba880be1fae4a1a184531e3228d62dae Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Tue, 19 May 2026 01:20:21 +0800
Subject: [PATCH] Prepare App Store release 7.3.5 build 744
---
Apptag/SmartCategorization/SmartStartService.swift | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/Apptag/SmartCategorization/SmartStartService.swift b/Apptag/SmartCategorization/SmartStartService.swift
index 97016f4..220373a 100644
--- a/Apptag/SmartCategorization/SmartStartService.swift
+++ b/Apptag/SmartCategorization/SmartStartService.swift
@@ -261,7 +261,8 @@
source: .localCatalog,
reason: "Matched Smart Start catalog entry: \(matched.name)",
provenance: matched.sourceEvidence,
- defaultNote: matched.localizedNote
+ defaultNote: matched.localizedNote,
+ defaultNoteCandidates: matched.notes?.values.map { $0 } ?? []
))
}
@@ -348,12 +349,21 @@
}
if let defaultNote = assignment.defaultNote?.trimmingCharacters(in: .whitespacesAndNewlines),
- !defaultNote.isEmpty,
- store.appNotes[path]?.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty != false {
- store.appNotes[path] = String(defaultNote.prefix(TagDatabase.maxAppNoteLength))
- uncommonPaths.insert(path)
- if store.uncommonSources[path] == nil {
- store.uncommonSources[path] = .auto
+ !defaultNote.isEmpty {
+ let currentNote = store.appNotes[path]?.trimmingCharacters(in: .whitespacesAndNewlines)
+ let knownDefaultNotes = Set(assignment.defaultNoteCandidates.compactMap(normalizedNote))
+ let normalizedCurrentNote = normalizedNote(currentNote)
+ let shouldSeedNote = currentNote?.isEmpty != false
+ || normalizedCurrentNote.map { knownDefaultNotes.contains($0) } == true
+
+ if shouldSeedNote {
+ store.appNotes[path] = String(defaultNote.prefix(TagDatabase.maxAppNoteLength))
+ if currentNote?.isEmpty != false {
+ uncommonPaths.insert(path)
+ if store.uncommonSources[path] == nil {
+ store.uncommonSources[path] = .auto
+ }
+ }
}
}
}
--
Gitblit v1.9.3