fix keep peer card order when connect failed
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
09a6b3c30a
commit
5028b8a93d
@ -1151,6 +1151,10 @@ impl LoginConfigHandler {
|
|||||||
///
|
///
|
||||||
/// * `config` - [`PeerConfig`] to save.
|
/// * `config` - [`PeerConfig`] to save.
|
||||||
pub fn save_config(&mut self, config: PeerConfig) {
|
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);
|
config.store(&self.id);
|
||||||
self.config = config;
|
self.config = config;
|
||||||
}
|
}
|
||||||
@ -1209,10 +1213,6 @@ impl LoginConfigHandler {
|
|||||||
/// * `k` - key of option
|
/// * `k` - key of option
|
||||||
/// * `v` - value of option
|
/// * `v` - value of option
|
||||||
pub fn save_ui_flutter(&mut self, k: String, v: String) {
|
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();
|
let mut config = self.load_config();
|
||||||
config.ui_flutter.insert(k, v);
|
config.ui_flutter.insert(k, v);
|
||||||
self.save_config(config);
|
self.save_config(config);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user