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:
parent
6186b41e3f
commit
0c32a889a9
@ -562,6 +562,10 @@ class AbModel {
|
|||||||
final data = jsonDecode(cache);
|
final data = jsonDecode(cache);
|
||||||
if (data == null || data['access_token'] != access_token) return;
|
if (data == null || data['access_token'] != access_token) return;
|
||||||
_deserializeCache(data);
|
_deserializeCache(data);
|
||||||
|
final name = bind.getLocalFlutterOption(k: 'current-ab-name');
|
||||||
|
if (addressbooks.containsKey(name)) {
|
||||||
|
_currentName.value = name;
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint("load ab cache: $e");
|
debugPrint("load ab cache: $e");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user