Skip to content

Commit

Permalink
fixed post reports not being login guarded
Browse files Browse the repository at this point in the history
  • Loading branch information
clragon committed Nov 24, 2021
1 parent 159418f commit 72e87f1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/post/widgets/widgets/appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ List<PopupMenuItem<VoidCallback>> postMenuUserActions(
PopupMenuTile(
title: 'Report',
icon: Icons.report,
value: () async {
Navigator.of(context).push(
value: () => guardWithLogin(
context: context,
callback: () => Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => PostReportScreen(post: post),
),
);
},
),
error: 'You must be logged in to report posts!',
),
),
PopupMenuTile(
title: 'Flag',
Expand Down

0 comments on commit 72e87f1

Please sign in to comment.