Fix ab merge and sync from recent (#6910)

* fix missing platform when merge ab

Signed-off-by: 21pages <pages21@163.com>

* sync from recent after ab initialized

Signed-off-by: 21pages <pages21@163.com>

---------

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2024-01-17 14:38:12 +08:00 committed by GitHub
parent 58fd8780e5
commit 6548f9f0ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,6 +55,7 @@ class AbModel {
Timer.periodic(Duration(milliseconds: 500), (timer) async {
if (_timerCounter++ % 6 == 0) {
if (!gFFI.userModel.isLogin) return;
if (!initialized) return;
syncFromRecent();
}
});
@ -378,6 +379,7 @@ class AbModel {
p.hash = r.hash.isEmpty ? p.hash : r.hash;
p.username = r.username.isEmpty ? p.username : r.username;
p.hostname = r.hostname.isEmpty ? p.hostname : r.hostname;
p.platform = r.platform.isEmpty ? p.platform : r.platform;
p.alias = p.alias.isEmpty ? r.alias : p.alias;
p.forceAlwaysRelay = r.forceAlwaysRelay;
p.rdpPort = r.rdpPort;