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:
parent
cf4803684c
commit
190561b588
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user