From bdd04603c7f78ba27dd5ff8c1713d7d71aa9a3c9 Mon Sep 17 00:00:00 2001 From: dijunkun Date: Sun, 25 Oct 2026 03:07:13 +0800 Subject: [PATCH] [feat] enable screen lock on disconnect by default --- apps/desktop/src/config_center/config_center.cpp | 2 +- apps/desktop/src/config_center/config_center.h | 2 +- apps/desktop/src/gui/ui/main_window.slint | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/config_center/config_center.cpp b/apps/desktop/src/config_center/config_center.cpp index 67e135bf..ce831fd2 100644 --- a/apps/desktop/src/config_center/config_center.cpp +++ b/apps/desktop/src/config_center/config_center.cpp @@ -138,7 +138,7 @@ int ConfigCenter::Load() { enable_privacy_screen_.store( ini_->GetBoolValue(section_, "enable_privacy_screen", true)); lock_on_disconnect_.store( - ini_->GetBoolValue(section_, "lock_on_disconnect", false)); + ini_->GetBoolValue(section_, "lock_on_disconnect", true)); save_remote_previews_.store( ini_->GetBoolValue(section_, "save_remote_previews", true)); portable_service_prompt_suppressed_ = diff --git a/apps/desktop/src/config_center/config_center.h b/apps/desktop/src/config_center/config_center.h index e2d74cde..ca7fdffa 100644 --- a/apps/desktop/src/config_center/config_center.h +++ b/apps/desktop/src/config_center/config_center.h @@ -105,7 +105,7 @@ class ConfigCenter { bool enable_autostart_ = false; bool enable_daemon_ = false; std::atomic enable_privacy_screen_{true}; - std::atomic lock_on_disconnect_{false}; + std::atomic lock_on_disconnect_{true}; std::atomic save_remote_previews_{true}; bool portable_service_prompt_suppressed_ = false; std::string sponsorship_prompt_dismissed_version_; diff --git a/apps/desktop/src/gui/ui/main_window.slint b/apps/desktop/src/gui/ui/main_window.slint index 67232ce5..52b440e2 100644 --- a/apps/desktop/src/gui/ui/main_window.slint +++ b/apps/desktop/src/gui/ui/main_window.slint @@ -647,7 +647,7 @@ export component MainWindow inherits Window { in property privacy-setting-available: false; in-out property privacy-on-connect-enabled: true; in property lock-on-disconnect-available: false; - in-out property lock-on-disconnect-enabled: false; + in-out property lock-on-disconnect-enabled: true; in-out property file-save-path: ""; in-out property server-host: ""; in-out property server-port: "";