optimized avatar and linkify performance, refined navigation to preserve popups, implemented read marker caching, and added file size limits for saving, minor timetable details changes
This commit is contained in:
@@ -26,9 +26,17 @@ class NotificationController {
|
||||
BuildContext context,
|
||||
) async {
|
||||
final pushToken = _extractChatToken(message);
|
||||
final activeToken = context.read<ChatBloc>().state.data?.currentToken ?? '';
|
||||
final chatBloc = context.read<ChatBloc>();
|
||||
// hasOpenChat (not currentToken) is the source of truth here:
|
||||
// currentToken sticks around after leaveChat so that didPopNext can
|
||||
// re-claim a stacked chat. Using it would suppress notifications for
|
||||
// the last-opened chat even after the user has navigated away.
|
||||
final activeToken = chatBloc.state.data?.currentToken ?? '';
|
||||
final chatIsOpen =
|
||||
pushToken != null && pushToken.isNotEmpty && pushToken == activeToken;
|
||||
chatBloc.hasOpenChat &&
|
||||
pushToken != null &&
|
||||
pushToken.isNotEmpty &&
|
||||
pushToken == activeToken;
|
||||
|
||||
NotificationTasks.updateBadgeCount(message);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user