diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-06-12 23:23:48 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-06-12 23:23:48 +0530 |
| commit | cef0f85cf0b1536fce77b0a809c4208f38472225 (patch) | |
| tree | bd7d1e65a887950e9737f0ddc62f833402c74fdb /src | |
| parent | 85cb438cd0476d230667dec291022baee5793e79 (diff) | |
| download | pomoru-cef0f85cf0b1536fce77b0a809c4208f38472225.tar.xz pomoru-cef0f85cf0b1536fce77b0a809c4208f38472225.zip | |
add backward compatibility for older configs
Diffstat (limited to 'src')
| -rw-r--r-- | src/pomo/state.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pomo/state.rs b/src/pomo/state.rs index 0e2037f..f2e65dc 100644 --- a/src/pomo/state.rs +++ b/src/pomo/state.rs @@ -91,9 +91,15 @@ pub struct Config { pub short_break_mins: u64, pub long_break_mins: u64, pub tasks: Vec<Task>, + + #[serde(default = "default_auto_switch")] pub auto_switch_sessions: bool, } +fn default_auto_switch() -> bool { + true +} + #[derive(Serialize, Deserialize, Clone)] pub struct Task { pub title: String, |