fix(app): Phase 1.1 紧急修复 — SyncEngine 接入 + authorId + catch 异常处理
- feat(sync): SyncEngine 接入 EditorPage, 保存时 enqueue + 网络恢复自动 trySync - fix(editor): authorId 从 AuthBloc 获取, 替代硬编码 'local' - fix(bloc): class_bloc/calendar/profile/parent catch(_).全部改为 debugPrint - feat(editor): 编辑器工具栏拆分 (brush_panel/tag_panel/text_format_bar/dot_grid_painter) - feat(editor): EditorBloc 扩展 + EditorPage 增强 - feat(search): SearchBloc 扩展搜索功能 - feat(home): HomeBloc/HomePage 增强 - feat(auth): LoginPage 增强 - feat(templates): TemplateGalleryPage 重构 - fix(web): 管理端班级/日记页面修复 - fix(server): comment_service + theme_handler 修复 - docs: 添加全链路审计报告和验证截图
This commit is contained in:
@@ -50,7 +50,8 @@ class _MonthlyPageState extends State<MonthlyPage> {
|
||||
try {
|
||||
final elements = await _repo.getElements(journal.id);
|
||||
photoCount += elements.where((e) => e.elementType == ElementType.image).length;
|
||||
} catch (_) {
|
||||
} catch (e) {
|
||||
debugPrint('MonthlyPage: 加载日记 ${journal.id} 元素失败: $e');
|
||||
// 单个日记加载元素失败不影响整体统计
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,8 @@ class _WeeklyPageState extends State<WeeklyPage> {
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
} catch (_) {
|
||||
} catch (e) {
|
||||
debugPrint('WeeklyPage._loadWeekData 失败: $e');
|
||||
if (mounted) setState(() => _isLoading = false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user