Fix reply button showing when not logged in
This commit is contained in:
parent
da60dd8c87
commit
be9d9f5721
|
@ -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(
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue