Revert "Tie alerts attach the app icon explicitly"

This reverts commit b1889dacf5.
This commit is contained in:
Ade Thompson
2026-08-12 11:26:58 +01:00
committed by FuelBoard Contributor
parent b1889dacf5
commit 7d0a3645ee
+2 -21
View File
@@ -261,19 +261,11 @@ final class ProximityMonitor: NSObject, ObservableObject, @preconcurrency CLLoca
// Tie case: no map. A snapshot would only show one arbitrary station
// (the primary), which is misleading the user must pick from the
// action buttons. Deliver immediately with the choice buttons, and
// attach the app icon so the FuelBoard identity shows explicitly
// (the notification header icon is the container's inside
// LiveContainer, so the banner's right-hand thumbnail is the icon).
// action buttons. Deliver immediately with the choice buttons.
if !ties.isEmpty {
self.registerTieCategory(identifier: identifier, ties: ties)
content.categoryIdentifier = "tie-\(identifier)"
if let icon = Self.appIconAttachment() {
content.attachments = [icon]
mapStatus?("map: none (tie) · icon: attached")
} else {
mapStatus?("map: none (tie — pick a station)")
}
mapStatus?("map: none (tie — pick a station)")
UNUserNotificationCenter.current().add(
UNNotificationRequest(identifier: identifier, content: content, trigger: nil)
)
@@ -373,17 +365,6 @@ final class ProximityMonitor: NSObject, ObservableObject, @preconcurrency CLLoca
}
}
/// The app's own icon as a notification attachment, so the FuelBoard
/// identity shows explicitly even though the notification header icon is
/// the container's inside LiveContainer. Pulls the compiled
/// AppIcon60x60@2x.png straight from the bundle.
private static func appIconAttachment() -> UNNotificationAttachment? {
guard let url = Bundle.main.url(forResource: "AppIcon60x60@2x", withExtension: "png") else {
return nil
}
return try? UNNotificationAttachment(identifier: "icon", url: url, options: nil)
}
/// Fires a test alert built from REAL data: the cheapest station selling
/// the monitored fuel within the configured alert radius of the current
/// location the same criteria a live geofence entry would apply, minus