Stabilize server lifecycle, client settings and release qualification

This commit is contained in:
Дмитрий committed 2026-10-30 14:04:18 +05:00
1 parent 4d1a6e0b21
commit 30d2f56997
71 files changed
+2785 -168

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
use std::path::Path;
pub fn close_to_tray(dir: &Path) -> coa_core::Result<bool> {
match std::fs::read(dir.join("close-to-tray.json")) {
Ok(bytes) => Ok(serde_json::from_slice(&bytes)?),
Err(e) if e.kind() == std::io::ErrorKind::NotFound => Ok(false),
Err(e) => Err(e.into()),
}
}
pub fn save(dir: &Path, enabled: bool) -> coa_core::Result<()> {
coa_core::fsx::atomic_write_json(&dir.join("close-to-tray.json"), &enabled)
}