fix: chat settings not opening
feat: unread marker on thread cards
This commit is contained in:
parent
ae3c2d84d4
commit
22209b03f2
File diff suppressed because one or more lines are too long
|
|
@ -149,6 +149,10 @@ abstract class AppRoutes {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
redirect: loggedOutRedirect,
|
redirect: loggedOutRedirect,
|
||||||
|
routes: [
|
||||||
|
GoRoute(
|
||||||
|
path: 'threads',
|
||||||
|
redirect: loggedOutRedirect,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: ':threadroot',
|
path: ':threadroot',
|
||||||
|
|
@ -166,6 +170,8 @@ abstract class AppRoutes {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
redirect: loggedOutRedirect,
|
redirect: loggedOutRedirect,
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
|
|
@ -367,6 +373,10 @@ abstract class AppRoutes {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
redirect: loggedOutRedirect,
|
redirect: loggedOutRedirect,
|
||||||
|
routes: [
|
||||||
|
GoRoute(
|
||||||
|
path: 'threads',
|
||||||
|
redirect: loggedOutRedirect,
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: ':threadroot',
|
path: ':threadroot',
|
||||||
|
|
@ -375,11 +385,14 @@ abstract class AppRoutes {
|
||||||
state,
|
state,
|
||||||
ThreadPage(
|
ThreadPage(
|
||||||
roomId: state.pathParameters['roomid']!,
|
roomId: state.pathParameters['roomid']!,
|
||||||
threadRootEventId: state.pathParameters['threadroot']!,
|
threadRootEventId:
|
||||||
|
state.pathParameters['threadroot']!,
|
||||||
eventId: state.uri.queryParameters['event'],
|
eventId: state.uri.queryParameters['event'],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: 'search',
|
path: 'search',
|
||||||
pageBuilder: (context, state) => defaultPageBuilder(
|
pageBuilder: (context, state) => defaultPageBuilder(
|
||||||
|
|
|
||||||
|
|
@ -957,10 +957,12 @@ class ChatController extends State<ChatPageWithRoom>
|
||||||
client: room.client,
|
client: room.client,
|
||||||
currentUserParticipated: false,
|
currentUserParticipated: false,
|
||||||
count: 0,
|
count: 0,
|
||||||
|
highlightCount: 0,
|
||||||
|
notificationCount: 0,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
context.go('/rooms/$roomId/${event.eventId}');
|
context.go('/rooms/$roomId/threads/${event.eventId}');
|
||||||
selectedEvents.clear();
|
selectedEvents.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -703,7 +703,7 @@ class Message extends StatelessWidget {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.chat_bubble_outline,
|
(thread?.hasNewMessages ?? false) ? Icons.mark_chat_unread_outlined : Icons.chat_bubble_outline,
|
||||||
color: Colors.grey[200],
|
color: Colors.grey[200],
|
||||||
size: 20,
|
size: 20,
|
||||||
),
|
),
|
||||||
|
|
@ -738,7 +738,7 @@ class Message extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
onTap: () => context.go(
|
onTap: () => context.go(
|
||||||
'/rooms/${event.roomId}/${event.eventId}',
|
'/rooms/${event.roomId}/threads/${event.eventId}',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue