From 6548f9f0ed98d9b72858d1476ca1515914a90413 Mon Sep 17 00:00:00 2001 From: 21pages Date: Wed, 17 Jan 2024 14:38:12 +0800 Subject: [PATCH] Fix ab merge and sync from recent (#6910) * fix missing platform when merge ab Signed-off-by: 21pages * sync from recent after ab initialized Signed-off-by: 21pages --------- Signed-off-by: 21pages --- flutter/lib/models/ab_model.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flutter/lib/models/ab_model.dart b/flutter/lib/models/ab_model.dart index 4cb76ed6f83e..555a803ca187 100644 --- a/flutter/lib/models/ab_model.dart +++ b/flutter/lib/models/ab_model.dart @@ -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;