From ead1d1e9a2215f52169f4e0b503dc5cf597eafbf Mon Sep 17 00:00:00 2001 From: jack Date: Sat, 13 Sep 2025 10:37:05 +0200 Subject: [PATCH] Location notes: append 'ago' to relative timestamps (within 7 days) --- bitchat/Views/LocationNotesView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitchat/Views/LocationNotesView.swift b/bitchat/Views/LocationNotesView.swift index 6c279bf8..f27779f6 100644 --- a/bitchat/Views/LocationNotesView.swift +++ b/bitchat/Views/LocationNotesView.swift @@ -122,7 +122,8 @@ struct LocationNotesView: View { let now = Date() if let days = Calendar.current.dateComponents([.day], from: date, to: now).day, days < 7 { // Relative (minute/hour/day), no seconds - return Self.relativeFormatter.string(from: date, to: now) ?? "" + let rel = Self.relativeFormatter.string(from: date, to: now) ?? "" + return rel.isEmpty ? "" : "\(rel) ago" } else { // Absolute date (MMM d or MMM d, yyyy if different year) let sameYear = Calendar.current.isDate(date, equalTo: now, toGranularity: .year)