From 0c32a889a91e91a27022b485eda3f97342df7321 Mon Sep 17 00:00:00 2001 From: 21pages Date: Thu, 28 Mar 2024 19:37:25 +0800 Subject: [PATCH] fix ab cache not work, set current ab name after load cache (#7542) Signed-off-by: 21pages --- flutter/lib/models/ab_model.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flutter/lib/models/ab_model.dart b/flutter/lib/models/ab_model.dart index 1fdb297c7431..b52c90516637 100644 --- a/flutter/lib/models/ab_model.dart +++ b/flutter/lib/models/ab_model.dart @@ -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"); }