diff --git a/lib/screens/account/profile.dart b/lib/screens/account/profile.dart index 7271e97..6fa89ee 100644 --- a/lib/screens/account/profile.dart +++ b/lib/screens/account/profile.dart @@ -22,6 +22,7 @@ import 'package:island/widgets/account/status.dart'; import 'package:island/widgets/alert.dart'; import 'package:island/widgets/app_scaffold.dart'; import 'package:island/widgets/content/cloud_files.dart'; +import 'package:island/widgets/safety/abuse_report_helper.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:palette_generator/palette_generator.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; @@ -475,22 +476,46 @@ class AccountProfileScreen extends HookConsumerWidget { : const Icon(Symbols.person_cancel), ), ), - Expanded( - child: FilledButton.icon( - onPressed: directMessageAction, - icon: const Icon(Symbols.message), - label: - Text( - accountChat.value == null - ? 'createDirectMessage' - : 'gotoDirectMessage', - maxLines: 1, - ).tr(), - ), - ), ], ).padding(horizontal: 16), ), + SliverToBoxAdapter( + child: Row( + spacing: 8, + children: [ + Expanded( + child: FilledButton.icon( + onPressed: directMessageAction, + icon: const Icon(Symbols.message), + label: + Text( + accountChat.value == null + ? 'createDirectMessage' + : 'gotoDirectMessage', + maxLines: 1, + ).tr(), + ), + ), + IconButton.filled( + onPressed: () { + showAbuseReportSheet( + context, + resourceIdentifier: 'account/${data.id}', + ); + }, + icon: Icon( + Symbols.flag, + color: Theme.of(context).colorScheme.onError, + ), + style: ButtonStyle( + backgroundColor: WidgetStatePropertyAll( + Theme.of(context).colorScheme.error, + ), + ), + ), + ], + ).padding(horizontal: 16, top: 4), + ), SliverToBoxAdapter( child: const Divider(height: 1).padding(top: 12), ), diff --git a/lib/widgets/post/post_item.dart b/lib/widgets/post/post_item.dart index 4343d15..4c30bda 100644 --- a/lib/widgets/post/post_item.dart +++ b/lib/widgets/post/post_item.dart @@ -576,7 +576,7 @@ class PostItem extends HookConsumerWidget { callback: () { showAbuseReportSheet( context, - resourceIdentifier: 'posts:${item.id}', + resourceIdentifier: 'post/${item.id}', ); }, ),