mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-21 01:05:18 +00:00
Can report group
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import 'package:comunic/helpers/server_config_helper.dart';
|
||||
import 'package:comunic/models/advanced_group_info.dart';
|
||||
import 'package:comunic/models/group.dart';
|
||||
import 'package:comunic/utils/date_utils.dart';
|
||||
@ -11,10 +12,12 @@ import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class AboutGroupSection extends StatelessWidget {
|
||||
final AdvancedGroupInfo group;
|
||||
final Function(Group) onReportGroup;
|
||||
|
||||
const AboutGroupSection({
|
||||
Key? key,
|
||||
required this.group,
|
||||
required this.onReportGroup,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
@ -103,6 +106,15 @@ class AboutGroupSection extends StatelessWidget {
|
||||
subtitle: Text(tr("Forez special features enabled")!),
|
||||
)
|
||||
: Container(),
|
||||
// Report group
|
||||
srvConfig!.isReportingEnabled
|
||||
? ListTile(
|
||||
textColor: Colors.red,
|
||||
leading: Icon(Icons.flag, color: Colors.red),
|
||||
title: Text(tr("Report abuse")!),
|
||||
onTap: () => onReportGroup(group),
|
||||
)
|
||||
: Container(),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user