feat: 添加起卦教程首次访问追踪和Agent时间上下文
- 后端 ProfileSettingsV1 添加 DivinationTutorialSettings 字段 - 前端三个起卦页面添加首次访问检测,自动弹出教程 - 教程展示后更新 settings 标记,避免重复弹出 - 使用本地状态管理避免并发更新覆盖问题 - Agent 系统提示添加时间上下文信息
This commit is contained in:
@@ -127,6 +127,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
allowVibration: widget.profileSettings.notification.allowVibration,
|
||||
notificationBloc: widget.notificationBloc,
|
||||
notificationRepository: widget.notificationRepository,
|
||||
profileSettings: widget.profileSettings,
|
||||
onProfileSettingsChanged: widget.onProfileSettingsChanged,
|
||||
),
|
||||
_ProfileTab(
|
||||
account: widget.account,
|
||||
@@ -160,6 +162,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
userId: widget.account,
|
||||
onCompleted: widget.onDivinationCompleted,
|
||||
allowVibration: widget.profileSettings.notification.allowVibration,
|
||||
profileSettings: widget.profileSettings,
|
||||
onProfileSettingsChanged: widget.onProfileSettingsChanged,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -177,6 +181,8 @@ class _HomeTab extends StatelessWidget {
|
||||
required this.allowVibration,
|
||||
required this.notificationBloc,
|
||||
required this.notificationRepository,
|
||||
required this.profileSettings,
|
||||
required this.onProfileSettingsChanged,
|
||||
});
|
||||
|
||||
final List<DivinationResultData> historyItems;
|
||||
@@ -189,6 +195,9 @@ class _HomeTab extends StatelessWidget {
|
||||
final bool allowVibration;
|
||||
final NotificationBloc notificationBloc;
|
||||
final NotificationRepository notificationRepository;
|
||||
final ProfileSettingsV1 profileSettings;
|
||||
final Future<void> Function(ProfileSettingsV1 settings)
|
||||
onProfileSettingsChanged;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -304,6 +313,9 @@ class _HomeTab extends StatelessWidget {
|
||||
userId: userId,
|
||||
onCompleted: onDivinationCompleted,
|
||||
allowVibration: allowVibration,
|
||||
profileSettings: profileSettings,
|
||||
onProfileSettingsChanged:
|
||||
onProfileSettingsChanged,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user