Skip to content

Commit 6ebdfd7

Browse files
feat(inbox): add detailed dates (#1295)
## What? Adds an `EnableDetailedDates` config option and a **General Settings** toggle for showing detailed inbox dates. When enabled, inbox timestamps render as absolute dates using the configured **Date Format** instead of relative labels like “2 hours ago”. ## Why? Closes #569 Some users prefer absolute dates in the inbox for clarity and consistency. This enables that preference while keeping the existing relative date behavior as the default. --------- Co-authored-by: Andriy Chernov <andriy@floatpane.com>
1 parent 6684bd6 commit 6ebdfd7

17 files changed

Lines changed: 70 additions & 16 deletions

File tree

config/config.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ type Config struct {
9393
DisableNotifications bool `json:"disable_notifications,omitempty"`
9494
EnableSplitPane bool `json:"enable_split_pane,omitempty"`
9595
EnableThreaded bool `json:"enable_threaded,omitempty"`
96+
EnableDetailedDates bool `json:"enable_detailed_dates,omitempty"`
9697
Theme string `json:"theme,omitempty"`
9798
MailingLists []MailingList `json:"mailing_lists,omitempty"`
9899
DateFormat string `json:"date_format,omitempty"`
@@ -405,6 +406,7 @@ type secureDiskConfig struct {
405406
DisableNotifications bool `json:"disable_notifications,omitempty"`
406407
EnableSplitPane bool `json:"enable_split_pane,omitempty"`
407408
EnableThreaded bool `json:"enable_threaded,omitempty"`
409+
EnableDetailedDates bool `json:"enable_detailed_dates,omitempty"`
408410
Theme string `json:"theme,omitempty"`
409411
MailingLists []MailingList `json:"mailing_lists,omitempty"`
410412
DateFormat string `json:"date_format,omitempty"`
@@ -451,6 +453,8 @@ func SaveConfig(config *Config) error {
451453
HideTips: config.HideTips,
452454
DisableNotifications: config.DisableNotifications,
453455
EnableSplitPane: config.EnableSplitPane,
456+
EnableThreaded: config.EnableThreaded,
457+
EnableDetailedDates: config.EnableDetailedDates,
454458
Theme: config.Theme,
455459
MailingLists: config.MailingLists,
456460
DateFormat: config.DateFormat,
@@ -554,6 +558,7 @@ func LoadConfig() (*Config, error) {
554558
DisableNotifications bool `json:"disable_notifications,omitempty"`
555559
EnableSplitPane bool `json:"enable_split_pane,omitempty"`
556560
EnableThreaded bool `json:"enable_threaded,omitempty"`
561+
EnableDetailedDates bool `json:"enable_detailed_dates,omitempty"`
557562
Theme string `json:"theme,omitempty"`
558563
MailingLists []MailingList `json:"mailing_lists,omitempty"`
559564
DateFormat string `json:"date_format,omitempty"`
@@ -592,6 +597,7 @@ func LoadConfig() (*Config, error) {
592597
config.DisableNotifications = raw.DisableNotifications
593598
config.EnableSplitPane = raw.EnableSplitPane
594599
config.EnableThreaded = raw.EnableThreaded
600+
config.EnableDetailedDates = raw.EnableDetailedDates
595601
config.Theme = raw.Theme
596602
config.MailingLists = raw.MailingLists
597603
config.DateFormat = raw.DateFormat

docs/docs/Configuration.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Configuration is stored in `~/.config/matcha/config.json`.
4444
],
4545
"theme": "Matcha",
4646
"enable_split_pane": true,
47+
"enable_detailed_dates": true,
48+
"date_format": "DD/MM/YYYY HH:MM",
4749
"disable_images": true,
4850
"hide_tips": true,
4951
"body_cache_threshold_mb": 100
@@ -54,6 +56,8 @@ Configuration is stored in `~/.config/matcha/config.json`.
5456

5557
`enable_split_pane` enables a side-by-side view where the email list and the selected email are shown on the same screen.
5658

59+
`enable_detailed_dates` shows absolute inbox dates using your configured `date_format` instead of relative labels like "2 hours ago".
60+
5761
`body_cache_threshold_mb` sets the maximum size (in megabytes) for the local email body cache. When this limit is reached, least recently accessed cached emails are evicted across all folders to make room for new ones. Defaults to `100` MB if not specified.
5862

5963
## Data Locations

i18n/locales/ar.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
"disable_notifications": "تعطيل الإشعارات",
154154
"enable_split_pane": "عرض مقسم",
155155
"enable_threaded": "عرض المحادثات",
156+
"enable_detailed_dates": "تواريخ مفصلة",
156157
"date_format": "تنسيق التاريخ",
157158
"language": "اللغة",
158159
"signature": "تعديل التوقيع",

i18n/locales/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"disable_notifications": "Benachrichtigungen Deaktivieren",
150150
"enable_split_pane": "Geteilte Ansicht",
151151
"enable_threaded": "Konversations-Threads",
152+
"enable_detailed_dates": "Detaillierte Datumsangaben",
152153
"date_format": "Datumsformat",
153154
"language": "Sprache",
154155
"signature": "Signatur Bearbeiten",

i18n/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"disable_notifications": "Disable Notifications",
150150
"enable_split_pane": "Split Pane View",
151151
"enable_threaded": "Threaded Conversation View",
152+
"enable_detailed_dates": "Detailed Dates",
152153
"date_format": "Date Format",
153154
"language": "Language",
154155
"signature": "Edit Signature",

i18n/locales/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"disable_notifications": "Deshabilitar Notificaciones",
150150
"enable_split_pane": "Vista dividida",
151151
"enable_threaded": "Vista de conversación",
152+
"enable_detailed_dates": "Fechas detalladas",
152153
"date_format": "Formato de Fecha",
153154
"language": "Idioma",
154155
"signature": "Editar Firma",

i18n/locales/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"disable_notifications": "Désactiver les Notifications",
150150
"enable_split_pane": "Vue divisée",
151151
"enable_threaded": "Vue par conversation",
152+
"enable_detailed_dates": "Dates détaillées",
152153
"date_format": "Format de Date",
153154
"language": "Langue",
154155
"signature": "Modifier la Signature",

i18n/locales/ja.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
"disable_notifications": "通知を無効化",
148148
"enable_split_pane": "分割ビュー",
149149
"enable_threaded": "スレッド表示",
150+
"enable_detailed_dates": "詳細な日付",
150151
"date_format": "日付形式",
151152
"language": "言語",
152153
"signature": "署名を編集",

i18n/locales/pl.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
"disable_notifications": "Wyłącz Powiadomienia",
154154
"enable_split_pane": "Widok podzielony",
155155
"enable_threaded": "Widok wątków",
156+
"enable_detailed_dates": "Szczegółowe daty",
156157
"date_format": "Format Daty",
157158
"language": "Język",
158159
"signature": "Edytuj Podpis",

i18n/locales/pt.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
"disable_notifications": "Desativar Notificações",
150150
"enable_split_pane": "Vista dividida",
151151
"enable_threaded": "Vista de conversação",
152+
"enable_detailed_dates": "Datas detalhadas",
152153
"date_format": "Formato de Data",
153154
"language": "Idioma",
154155
"signature": "Editar Assinatura",

0 commit comments

Comments
 (0)