1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 12:59:21 +00:00

Delete notification when they are clicked

This commit is contained in:
Pierre HUBERT 2019-11-02 13:46:05 +01:00
parent cf4803684c
commit 190561b588

View File

@ -121,6 +121,8 @@ class _NotificationsScreenState extends State<NotificationsScreen> {
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);
}
}