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

Add groups notifications support

This commit is contained in:
Pierre HUBERT 2020-04-16 16:04:15 +02:00
parent 90cbd7ab23
commit 806c6fbc2b

View File

@ -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."));