Skip to content

Commit bda8baa

Browse files
committed
fix(global): wordData not inited
Signed-off-by: OctagonalStar <[email protected]>
1 parent 500cade commit bda8baa

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
- 修复了FSRS算法对已经过期的单词无法计数的问题
2020
- 修复了日志中FSRS信息输出错误的问题
21+
- 修复了新用户无法进入的问题
2122

2223
## v0.1.11 - 2025-11-28 - (000111)
2324

lib/vars/global.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Global with ChangeNotifier {
2222
Uint8List? stella;
2323
String? arFont;
2424
String? zhFont;
25-
late final bool firstStart; // 是否为第一次使用
25+
late bool firstStart; // 是否为第一次使用
2626
late bool updateLogRequire; //是否需要显示更新日志
2727
late bool isWideScreen; // 设备是否是宽屏幕
2828
late final SharedPreferences prefs; // 储存实例
@@ -45,6 +45,7 @@ class Global with ChangeNotifier {
4545
logger.info("首次启动检测为真");
4646
updateLogRequire = false;
4747
await prefs.setString("wordData", jsonEncode({"Words": [], "Classes": {}}));
48+
wordData = DictData(words: [], classes: []);
4849
logger.info("首次启动: 配置表初始化完成");
4950
await postInit();
5051
} else {

0 commit comments

Comments
 (0)