From 806c6fbc2b65b1bc3cda8812a0b652262888efbb Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 16 Apr 2020 16:04:15 +0200 Subject: [PATCH] Add groups notifications support --- lib/ui/screens/notifications_screen.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ui/screens/notifications_screen.dart b/lib/ui/screens/notifications_screen.dart index 93691f8..0b1baa5 100644 --- a/lib/ui/screens/notifications_screen.dart +++ b/lib/ui/screens/notifications_screen.dart @@ -5,6 +5,7 @@ import 'package:comunic/lists/groups_list.dart'; import 'package:comunic/lists/notifications_list.dart'; import 'package:comunic/lists/users_list.dart'; import 'package:comunic/models/notification.dart' as n; +import 'package:comunic/ui/routes/home_route.dart'; import 'package:comunic/ui/widgets/account_image_widget.dart'; import 'package:comunic/utils/date_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; @@ -274,6 +275,9 @@ class _NotificationTile extends StatelessWidget { } else if (notification.onElemType == n.NotificationElementType.FRIENDSHIP_REQUEST) { openUserPage(userID: notification.fromUser, context: context); + } else if (notification.onElemType == + n.NotificationElementType.GROUP_MEMBERSHIP) { + HomeController.of(context).openGroup(notification.onElemId); } else { showSimpleSnack(context, tr("This kind of notification is not supported yet by this application."));