feat: 重构会话管理与提醒通知系统
This commit is contained in:
@@ -91,10 +91,11 @@ String? resolveAuthRedirect({
|
||||
return null;
|
||||
}
|
||||
|
||||
Widget buildHomeRouteScreen() {
|
||||
Widget buildHomeRouteScreen(AuthState authState) {
|
||||
final userId = authState is AuthAuthenticated ? authState.user.id : null;
|
||||
return BlocProvider<ChatBloc>.value(
|
||||
value: sl<ChatBloc>(),
|
||||
child: const HomeScreen(),
|
||||
child: HomeScreen(initialUserId: userId),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -149,7 +150,7 @@ GoRouter createAppRouter(AuthBloc authBloc) {
|
||||
),
|
||||
GoRoute(
|
||||
path: AppRoutes.homeMain,
|
||||
builder: (context, state) => buildHomeRouteScreen(),
|
||||
builder: (context, state) => buildHomeRouteScreen(authBloc.state),
|
||||
),
|
||||
GoRoute(
|
||||
path: AppRoutes.messageInviteList,
|
||||
|
||||
Reference in New Issue
Block a user