1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-20 16:55:17 +00:00

Users can report their own generated content (thanks Google Play reviewers)

This commit is contained in:
2022-08-04 13:45:10 +02:00
parent a24bb147c8
commit c5ee235ebd
6 changed files with 21 additions and 6 deletions

View File

@ -112,7 +112,9 @@ class CommentTile extends StatelessWidget {
child: Text(tr("Delete")!),
value: _CommentAction.DELETE,
),
]..addAll(srvConfig!.isReportingEnabled && !comment.isOwner
]..addAll(srvConfig!.isReportingEnabled &&
(!comment.isOwner ||
srvConfig!.reportPolicy!.canUserReportHisOwnContent)
? [
PopupMenuItem(
child: Text(tr("Report abuse")!),

View File

@ -97,8 +97,10 @@ class ConversationMessageTile extends StatelessWidget {
// Report the message
PopupMenuItem(
enabled:
srvConfig!.isReportingEnabled && !message.isOwner,
enabled: srvConfig!.isReportingEnabled &&
(!message.isOwner ||
srvConfig!.reportPolicy!
.canUserReportHisOwnContent),
value: _MenuChoices.REPORT,
child: Text(tr("Report abuse")!),
),

View File

@ -156,7 +156,9 @@ class _PostTileState extends State<PostTile> {
value: _PostActions.DELETE,
enabled: widget.post.canDelete,
),
]..addAll(srvConfig!.isReportingEnabled && !widget.post.isOwner
]..addAll(srvConfig!.isReportingEnabled &&
(!widget.post.isOwner ||
srvConfig!.reportPolicy!.canUserReportHisOwnContent)
? [
PopupMenuItem(
child: Text(tr("Report abuse")!),