1use crate::types::*;
2
3impl Default for GeneralConfig {
4 fn default() -> Self {
5 Self {
6 editor: None,
7 default_account: None,
8 sync_interval: 60,
9 hook_timeout: 30,
10 attachment_dir: crate::resolve::data_dir().join("attachments"),
11 }
12 }
13}
14
15impl Default for RenderConfig {
16 fn default() -> Self {
17 Self {
18 html_command: None,
19 reader_mode: true,
20 show_reader_stats: true,
21 }
22 }
23}
24
25impl Default for SearchConfig {
26 fn default() -> Self {
27 Self {
28 default_sort: SortOrder::DateDesc,
29 max_results: 200,
30 }
31 }
32}
33
34impl Default for SnoozeConfig {
35 fn default() -> Self {
36 Self {
37 morning_hour: 9,
38 evening_hour: 18,
39 weekend_day: "saturday".to_string(),
40 weekend_hour: 10,
41 }
42 }
43}
44
45impl Default for AppearanceConfig {
46 fn default() -> Self {
47 Self {
48 theme: "default".to_string(),
49 sidebar: true,
50 date_format: "%b %d".to_string(),
51 date_format_full: "%Y-%m-%d %H:%M".to_string(),
52 subject_max_width: 60,
53 }
54 }
55}
56
57impl Default for LoggingConfig {
58 fn default() -> Self {
59 Self {
60 level: "info".to_string(),
61 max_size_mb: 250,
62 max_files: 10,
63 stderr: true,
64 event_retention_days: 90,
65 }
66 }
67}