diff --git a/lib/src/screens/entries/entry_comment.dart b/lib/src/screens/entries/entry_comment.dart index c5f0143..d82c8e5 100644 --- a/lib/src/screens/entries/entry_comment.dart +++ b/lib/src/screens/entries/entry_comment.dart @@ -72,7 +72,7 @@ class _EntryCommentState extends State { children: widget.comment.children, )); }), - onReply: (body) async { + onReply: whenLoggedIn(context, (body) async { var newSubComment = await api_comments.postComment( context.read().httpClient, context.read().instanceHost, @@ -85,7 +85,7 @@ class _EntryCommentState extends State { 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( diff --git a/lib/src/screens/entries/entry_page.dart b/lib/src/screens/entries/entry_page.dart index b3d52cd..cbaafc5 100644 --- a/lib/src/screens/entries/entry_page.dart +++ b/lib/src/screens/entries/entry_page.dart @@ -93,7 +93,7 @@ class _EntryPageState extends State { child: EntryItem( _data!, _onUpdate, - onReply: (body) async { + onReply: whenLoggedIn(context, (body) async { var newComment = await api_comments.postComment( context.read().httpClient, context.read().instanceHost, @@ -105,7 +105,7 @@ class _EntryPageState extends State { setState(() { _pagingController.itemList = newList; }); - }, + }), onEdit: _data!.visibility != 'soft_deleted' ? whenLoggedIn( context, diff --git a/lib/src/screens/posts/post_comment.dart b/lib/src/screens/posts/post_comment.dart index 2d3fbab..4fe63a0 100644 --- a/lib/src/screens/posts/post_comment.dart +++ b/lib/src/screens/posts/post_comment.dart @@ -72,7 +72,7 @@ class _EntryCommentState extends State { children: widget.comment.children, )); }), - onReply: (body) async { + onReply: whenLoggedIn(context, (body) async { var newSubComment = await api_comments.postComment( context.read().httpClient, context.read().instanceHost, @@ -85,7 +85,7 @@ class _EntryCommentState extends State { 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( diff --git a/lib/src/screens/posts/post_page.dart b/lib/src/screens/posts/post_page.dart index 381196a..6fec260 100644 --- a/lib/src/screens/posts/post_page.dart +++ b/lib/src/screens/posts/post_page.dart @@ -91,7 +91,7 @@ class _PostPageState extends State { child: PostItem( _data!, _onUpdate, - onReply: (body) async { + onReply: whenLoggedIn(context, (body) async { var newComment = await api_comments.postComment( context.read().httpClient, context.read().instanceHost, @@ -103,7 +103,7 @@ class _PostPageState extends State { setState(() { _pagingController.itemList = newList; }); - }, + }), onEdit: _data!.visibility != 'soft_deleted' ? whenLoggedIn( context,