Merge pull request #202 from krawieck/small-fixes

This commit is contained in:
Filip Krawczyk 2021-04-06 18:54:30 +02:00 committed by GitHub
commit 9d90aa9aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 13 deletions

View File

@ -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

View File

@ -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,

View File

@ -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(

View File

@ -39,7 +39,7 @@ class ManageAccountPage extends HookWidget {
return Scaffold(
appBar: AppBar(
title: Text('@$instanceHost@$username'),
title: Text('$username@$instanceHost'),
),
body: FutureBuilder<LocalUserSettingsView>(
future: userFuture,

View File

@ -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()),

View File

@ -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) {

View File

@ -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),
),