Skip to content

Commit

Permalink
fix: #481
Browse files Browse the repository at this point in the history
  • Loading branch information
w568w committed Jan 10, 2025
1 parent c86ed34 commit 9a7288b
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions lib/page/forum/hole_detail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -891,19 +891,22 @@ class BBSPostDetailState extends State<BBSPostDetail> {
},
child: Text(S.of(context).share_floor),
),
PlatformContextMenuItem(
menuContext: menuContext,
onPressed: () async {
setState(() {
if ((_renderModel as Normal).selectedPerson != null) {
(_renderModel as Normal).selectedPerson = null;
} else {
(_renderModel as Normal).selectedPerson = e.anonyname;
}
});
},
child: Text((_renderModel as Normal).selectedPerson != null ? S.of(context).show_all_replies : S.of(context).show_this_person),
),
if (_renderModel
case Normal(selectedPerson: var selectedPerson, hole: _)) ...[
PlatformContextMenuItem(
menuContext: menuContext,
onPressed: () async {
setState(() {
var model = _renderModel as Normal;
model.selectedPerson =
model.selectedPerson != null ? null : e.anonyname;
});
},
child: Text(selectedPerson != null
? S.of(context).show_all_replies
: S.of(context).show_this_person),
),
],
PlatformContextMenuItem(
menuContext: menuContext,
isDestructive: true,
Expand Down

0 comments on commit 9a7288b

Please sign in to comment.