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)),
|
onPressed: () => PostWidget.showMoreMenu(context, post)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: post.post.locked
|
||||||
onPressed: loggedInAction((_) => comment()),
|
? null
|
||||||
child: const Icon(Icons.comment)),
|
: FloatingActionButton(
|
||||||
|
onPressed: loggedInAction((_) => comment()),
|
||||||
|
child: const Icon(Icons.comment),
|
||||||
|
),
|
||||||
body: RefreshIndicator(
|
body: RefreshIndicator(
|
||||||
onRefresh: refresh,
|
onRefresh: refresh,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
|
|
|
@ -297,7 +297,9 @@ class CommentWidget extends HookWidget {
|
||||||
tooltip: L10n.of(context).more,
|
tooltip: L10n.of(context).more,
|
||||||
),
|
),
|
||||||
_SaveComment(commentTree.comment),
|
_SaveComment(commentTree.comment),
|
||||||
if (!isDeleted.value && !comment.comment.removed)
|
if (!isDeleted.value &&
|
||||||
|
!comment.comment.removed &&
|
||||||
|
!comment.post.locked)
|
||||||
TileAction(
|
TileAction(
|
||||||
icon: Icons.reply,
|
icon: Icons.reply,
|
||||||
onPressed: loggedInAction((_) => reply()),
|
onPressed: loggedInAction((_) => reply()),
|
||||||
|
|
Loading…
Reference in New Issue