skip PeerConfig saving when not receiving peerinfo to keep peercard order

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-09 07:42:22 +08:00
parent 312c6324d2
commit e830a59c2a
2 changed files with 9 additions and 0 deletions

View File

@@ -1209,6 +1209,10 @@ 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);