fix ab cache not work, set current ab name after load cache (#7542)

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2024-03-28 19:37:25 +08:00 committed by GitHub
parent 6186b41e3f
commit 0c32a889a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -562,6 +562,10 @@ class AbModel {
final data = jsonDecode(cache);
if (data == null || data['access_token'] != access_token) return;
_deserializeCache(data);
final name = bind.getLocalFlutterOption(k: 'current-ab-name');
if (addressbooks.containsKey(name)) {
_currentName.value = name;
}
} catch (e) {
debugPrint("load ab cache: $e");
}