feat: 实现日历提醒完整功能(操作执行、通知服务重构、归档)
- 新增 ReminderActionExecutor 处理取消/稍后提醒操作 - 新增 ReminderOutboxStore 本地存储待处理操作 - 重构 LocalNotificationService 支持聚合提醒和交互操作 - 新增 event_color_resolver 工具类统一颜色解析 - 新增 CalendarService.archiveEvent 归档方法 - 增强 ModelTracking 支持缓存命中、推理token和成本追踪 - 添加 qwen3.5-35b-a3b 模型配置 - 更新 AndroidManifest 全屏intent权限 - 补充相关单元测试和文档
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import '../api/api_client.dart';
|
||||
import '../api/i_api_client.dart';
|
||||
import '../storage/token_storage.dart';
|
||||
@@ -13,6 +14,8 @@ import '../../features/auth/presentation/bloc/auth_bloc.dart';
|
||||
import '../../features/auth/presentation/bloc/auth_event.dart';
|
||||
import '../../features/calendar/data/calendar_api.dart';
|
||||
import '../../features/calendar/data/services/calendar_service.dart';
|
||||
import '../../features/calendar/reminders/reminder_action_executor.dart';
|
||||
import '../../features/calendar/reminders/reminder_outbox_store.dart';
|
||||
import '../../features/calendar/ui/calendar_state_manager.dart';
|
||||
import '../../features/friends/data/friends_api.dart';
|
||||
import '../../features/messages/data/inbox_api.dart';
|
||||
@@ -49,6 +52,9 @@ Future<void> configureDependencies() async {
|
||||
final authApi = AuthApi(apiClient);
|
||||
sl.registerSingleton<AuthApi>(authApi);
|
||||
|
||||
final sharedPreferences = await SharedPreferences.getInstance();
|
||||
sl.registerSingleton<SharedPreferences>(sharedPreferences);
|
||||
|
||||
final usersApi = UsersApi(apiClient);
|
||||
sl.registerSingleton<UsersApi>(usersApi);
|
||||
|
||||
@@ -58,8 +64,18 @@ Future<void> configureDependencies() async {
|
||||
final calendarService = CalendarService(apiClient: apiClient);
|
||||
sl.registerSingleton<CalendarService>(calendarService);
|
||||
|
||||
final reminderOutboxStore = ReminderOutboxStore(sharedPreferences);
|
||||
sl.registerSingleton<ReminderOutboxStore>(reminderOutboxStore);
|
||||
|
||||
sl.registerSingleton<LocalNotificationService>(LocalNotificationService());
|
||||
|
||||
final reminderActionExecutor = ReminderActionExecutor(
|
||||
calendarService: calendarService,
|
||||
notificationService: sl<LocalNotificationService>(),
|
||||
outboxStore: reminderOutboxStore,
|
||||
);
|
||||
sl.registerSingleton<ReminderActionExecutor>(reminderActionExecutor);
|
||||
|
||||
final friendsApi = FriendsApi(apiClient);
|
||||
sl.registerSingleton<FriendsApi>(friendsApi);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user