Disable commenting on locked posts, fixes #159
This commit is contained in:
parent
fba51bb364
commit
d2dd388228
|
@ -115,9 +115,12 @@ class FullPostPage extends HookWidget {
|
|||
onPressed: () => PostWidget.showMoreMenu(context, post)),
|
||||
],
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: loggedInAction((_) => comment()),
|
||||
child: const Icon(Icons.comment)),
|
||||
floatingActionButton: post.post.locked
|
||||
? null
|
||||
: FloatingActionButton(
|
||||
onPressed: loggedInAction((_) => comment()),
|
||||
child: const Icon(Icons.comment),
|
||||
),
|
||||
body: RefreshIndicator(
|
||||
onRefresh: refresh,
|
||||
child: ListView(
|
||||
|
|
|
@ -297,7 +297,9 @@ class CommentWidget extends HookWidget {
|
|||
tooltip: L10n.of(context).more,
|
||||
),
|
||||
_SaveComment(commentTree.comment),
|
||||
if (!isDeleted.value && !comment.comment.removed)
|
||||
if (!isDeleted.value &&
|
||||
!comment.comment.removed &&
|
||||
!comment.post.locked)
|
||||
TileAction(
|
||||
icon: Icons.reply,
|
||||
onPressed: loggedInAction((_) => reply()),
|
||||
|
|
Loading…
Reference in New Issue