perf: cache RelativeDateTimeFormatter; add .DS_Store to .gitignore

Co-authored-by: robonen <26167508+robonen@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-13 23:08:08 +00:00
parent d642bffcaa
commit 9259a3693a
3 changed files with 16 additions and 4 deletions
@@ -117,8 +117,12 @@ struct NotificationRowView: View {
extension Date {
var relativeFormatted: String {
Date.relativeDateTimeFormatter.localizedString(for: self, relativeTo: Date())
}
private static let relativeDateTimeFormatter: RelativeDateTimeFormatter = {
let formatter = RelativeDateTimeFormatter()
formatter.locale = Locale(identifier: "ru_RU")
return formatter.localizedString(for: self, relativeTo: Date())
}
return formatter
}()
}