From 190561b58878e240ff459220b192e369c28b960d Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 2 Nov 2019 13:46:05 +0100 Subject: [PATCH] Delete notification when they are clicked --- lib/ui/screens/notifications_screen.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/ui/screens/notifications_screen.dart b/lib/ui/screens/notifications_screen.dart index d6c09a7..93691f8 100644 --- a/lib/ui/screens/notifications_screen.dart +++ b/lib/ui/screens/notifications_screen.dart @@ -121,6 +121,8 @@ class _NotificationsScreenState extends State { child: Text(tr("You do not have any notification now.")), ), ); + + throw Error(); } /// Delete a notification @@ -272,8 +274,12 @@ class _NotificationTile extends StatelessWidget { } else if (notification.onElemType == n.NotificationElementType.FRIENDSHIP_REQUEST) { openUserPage(userID: notification.fromUser, context: context); + } else { + showSimpleSnack(context, + tr("This kind of notification is not supported yet by this application.")); + return; } - // TODO : mark the notification as seen + onDelete(notification); } }