fix: chat settings not opening

feat: unread marker on thread cards
This commit is contained in:
OfficialDakari 2025-10-26 15:00:42 +05:00
parent ae3c2d84d4
commit 22209b03f2
4 changed files with 38 additions and 23 deletions

File diff suppressed because one or more lines are too long

View File

@ -151,17 +151,23 @@ abstract class AppRoutes {
redirect: loggedOutRedirect,
routes: [
GoRoute(
path: ':threadroot',
pageBuilder: (context, state) => defaultPageBuilder(
context,
state,
ThreadPage(
roomId: state.pathParameters['roomid']!,
threadRootEventId:
state.pathParameters['threadroot']!,
eventId: state.uri.queryParameters['event'],
path: 'threads',
redirect: loggedOutRedirect,
routes: [
GoRoute(
path: ':threadroot',
pageBuilder: (context, state) => defaultPageBuilder(
context,
state,
ThreadPage(
roomId: state.pathParameters['roomid']!,
threadRootEventId:
state.pathParameters['threadroot']!,
eventId: state.uri.queryParameters['event'],
),
),
),
),
],
),
],
),
@ -369,16 +375,23 @@ abstract class AppRoutes {
redirect: loggedOutRedirect,
routes: [
GoRoute(
path: ':threadroot',
pageBuilder: (context, state) => defaultPageBuilder(
context,
state,
ThreadPage(
roomId: state.pathParameters['roomid']!,
threadRootEventId: state.pathParameters['threadroot']!,
eventId: state.uri.queryParameters['event'],
path: 'threads',
redirect: loggedOutRedirect,
routes: [
GoRoute(
path: ':threadroot',
pageBuilder: (context, state) => defaultPageBuilder(
context,
state,
ThreadPage(
roomId: state.pathParameters['roomid']!,
threadRootEventId:
state.pathParameters['threadroot']!,
eventId: state.uri.queryParameters['event'],
),
),
),
),
],
),
GoRoute(
path: 'search',

View File

@ -957,10 +957,12 @@ class ChatController extends State<ChatPageWithRoom>
client: room.client,
currentUserParticipated: false,
count: 0,
highlightCount: 0,
notificationCount: 0,
);
}
context.go('/rooms/$roomId/${event.eventId}');
context.go('/rooms/$roomId/threads/${event.eventId}');
selectedEvents.clear();
}

View File

@ -703,7 +703,7 @@ class Message extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Icon(
Icons.chat_bubble_outline,
(thread?.hasNewMessages ?? false) ? Icons.mark_chat_unread_outlined : Icons.chat_bubble_outline,
color: Colors.grey[200],
size: 20,
),
@ -738,7 +738,7 @@ class Message extends StatelessWidget {
],
),
onTap: () => context.go(
'/rooms/${event.roomId}/${event.eventId}',
'/rooms/${event.roomId}/threads/${event.eventId}',
),
),
),