Merge pull request #5316 from 21pages/select

refactor peer card multi select
This commit is contained in:
RustDesk
2023-08-10 08:32:07 +08:00
committed by GitHub
8 changed files with 139 additions and 91 deletions

View File

@@ -1151,6 +1151,10 @@ impl LoginConfigHandler {
///
/// * `config` - [`PeerConfig`] to save.
pub fn save_config(&mut self, config: PeerConfig) {
if self.version == 0 {
log::info!("skip saving peer config {}", self.id);
return;
}
config.store(&self.id);
self.config = config;
}
@@ -1209,10 +1213,6 @@ impl LoginConfigHandler {
/// * `k` - key of option
/// * `v` - value of option
pub fn save_ui_flutter(&mut self, k: String, v: String) {
if self.version == 0 && k == "wm_" {
log::info!("skip saving {k}");
return;
}
let mut config = self.load_config();
config.ui_flutter.insert(k, v);
self.save_config(config);