Fix reply button showing when not logged in

This commit is contained in:
John Wesley 2024-01-11 20:39:59 -05:00
parent da60dd8c87
commit be9d9f5721
4 changed files with 8 additions and 8 deletions

View File

@ -72,7 +72,7 @@ class _EntryCommentState extends State<EntryComment> {
children: widget.comment.children,
));
}),
onReply: (body) async {
onReply: whenLoggedIn(context, (body) async {
var newSubComment = await api_comments.postComment(
context.read<SettingsController>().httpClient,
context.read<SettingsController>().instanceHost,
@ -85,7 +85,7 @@ class _EntryCommentState extends State<EntryComment> {
childCount: widget.comment.childCount + 1,
children: [newSubComment, ...widget.comment.children!],
));
},
}),
onEdit: widget.comment.visibility != 'soft_deleted'
? whenLoggedIn(context, (body) async {
var newValue = await api_comments.editComment(

View File

@ -93,7 +93,7 @@ class _EntryPageState extends State<EntryPage> {
child: EntryItem(
_data!,
_onUpdate,
onReply: (body) async {
onReply: whenLoggedIn(context, (body) async {
var newComment = await api_comments.postComment(
context.read<SettingsController>().httpClient,
context.read<SettingsController>().instanceHost,
@ -105,7 +105,7 @@ class _EntryPageState extends State<EntryPage> {
setState(() {
_pagingController.itemList = newList;
});
},
}),
onEdit: _data!.visibility != 'soft_deleted'
? whenLoggedIn(
context,

View File

@ -72,7 +72,7 @@ class _EntryCommentState extends State<PostComment> {
children: widget.comment.children,
));
}),
onReply: (body) async {
onReply: whenLoggedIn(context, (body) async {
var newSubComment = await api_comments.postComment(
context.read<SettingsController>().httpClient,
context.read<SettingsController>().instanceHost,
@ -85,7 +85,7 @@ class _EntryCommentState extends State<PostComment> {
childCount: widget.comment.childCount + 1,
children: [newSubComment, ...widget.comment.children!],
));
},
}),
onEdit: widget.comment.visibility != 'soft_deleted'
? whenLoggedIn(context, (body) async {
var newValue = await api_comments.editComment(

View File

@ -91,7 +91,7 @@ class _PostPageState extends State<PostPage> {
child: PostItem(
_data!,
_onUpdate,
onReply: (body) async {
onReply: whenLoggedIn(context, (body) async {
var newComment = await api_comments.postComment(
context.read<SettingsController>().httpClient,
context.read<SettingsController>().instanceHost,
@ -103,7 +103,7 @@ class _PostPageState extends State<PostPage> {
setState(() {
_pagingController.itemList = newList;
});
},
}),
onEdit: _data!.visibility != 'soft_deleted'
? whenLoggedIn(
context,