diff --git a/CHANGELOG.md b/CHANGELOG.md index 3eb8021..9e688b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ### Changed +- Disable commenting on locked posts + +### Fixed + +- When writing a comment the parent text is now selectable +- Text of a post is now selectable - Account actions in settings are more obvious to access: long press an account/instance to see possible actions such as setting as default or removal ## v0.4.1 - 2021-04-06 diff --git a/lib/main.dart b/lib/main.dart index f22dfe7..ebbe6e6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -94,9 +94,16 @@ class MyHomePage extends HookWidget { return Scaffold( extendBody: true, - body: IndexedStack( - index: currentTab.value, - children: pages, + body: Column( + children: [ + Expanded( + child: IndexedStack( + index: currentTab.value, + children: pages, + ), + ), + const SizedBox(height: kMinInteractiveDimension / 2), + ], ), floatingActionButton: const CreatePostFab(), floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, diff --git a/lib/pages/full_post.dart b/lib/pages/full_post.dart index dc8ca1e..3986224 100644 --- a/lib/pages/full_post.dart +++ b/lib/pages/full_post.dart @@ -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( diff --git a/lib/pages/manage_account.dart b/lib/pages/manage_account.dart index 1b4bb21..f7a549f 100644 --- a/lib/pages/manage_account.dart +++ b/lib/pages/manage_account.dart @@ -39,7 +39,7 @@ class ManageAccountPage extends HookWidget { return Scaffold( appBar: AppBar( - title: Text('@$instanceHost@$username'), + title: Text('$username@$instanceHost'), ), body: FutureBuilder( future: userFuture, diff --git a/lib/widgets/comment.dart b/lib/widgets/comment.dart index a4577a6..57304ad 100644 --- a/lib/widgets/comment.dart +++ b/lib/widgets/comment.dart @@ -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()), diff --git a/lib/widgets/post.dart b/lib/widgets/post.dart index 39f17a2..0e27866 100644 --- a/lib/widgets/post.dart +++ b/lib/widgets/post.dart @@ -415,9 +415,13 @@ class PostWidget extends HookWidget { linkPreview(), if (post.post.body != null && fullPost) Padding( - padding: const EdgeInsets.all(10), - child: MarkdownText(post.post.body, - instanceHost: instanceHost)), + padding: const EdgeInsets.all(10), + child: MarkdownText( + post.post.body, + instanceHost: instanceHost, + selectable: true, + ), + ), if (post.post.body != null && !fullPost) LayoutBuilder( builder: (context, constraints) { diff --git a/lib/widgets/write_comment.dart b/lib/widgets/write_comment.dart index 6e82513..7044f2f 100644 --- a/lib/widgets/write_comment.dart +++ b/lib/widgets/write_comment.dart @@ -31,13 +31,17 @@ class WriteComment extends HookWidget { final body = () { final text = comment?.content ?? post.body; if (text == null) return const SizedBox.shrink(); - return MarkdownText(text, instanceHost: post.instanceHost); + return MarkdownText( + text, + instanceHost: post.instanceHost, + selectable: true, + ); }(); if (post != null) { return Column( children: [ - Text( + SelectableText( post.name, style: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600), ),