Skip to content

Commit 120acb0

Browse files
committed
fix(notification): handle opened notifications and update routing logic
- Update payload data handling for opened notifications - Modify routing logic for headline notifications - Improve code readability with added comments
1 parent cc15ac7 commit 120acb0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/app/view/app.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ class _AppViewState extends State<_AppView> {
214214
_routerLogger.fine(
215215
'Notification opened app with payload: ${payload.data}',
216216
);
217-
final contentType = payload.data['contentType'] as String?;
218-
final id = payload.data['id'] as String?;
217+
final contentType =
218+
payload.data['contentType'] as String?; // e.g., 'headline'
219+
final id = payload.data['headlineId'] as String?;
219220

220221
if (contentType == 'headline' && id != null) {
221222
_router.goNamed(

0 commit comments

Comments
 (0)