add min lines to display name to make them look not weird

This commit is contained in:
zoe 2022-10-01 11:59:43 +02:00
parent e633750ced
commit 8e7b0e013d
4 changed files with 15 additions and 3 deletions

View File

@ -374,7 +374,10 @@ class ProfileViewDisplay extends StatelessWidget {
d,
Padding(
padding: themes.defaultMargins,
child: PostTextRenderer(input: accountModel.note),
child: PostTextRenderer(
input: accountModel.note,
identityName: accountModel.identity,
),
),
if (relationshipModel != null)
Padding(

View File

@ -160,7 +160,10 @@ class ConversationButton extends StatelessWidget {
],
),
if (model.lastStatus != null)
PostTextRenderer(input: model.lastStatus!.content),
PostTextRenderer(
input: model.lastStatus!.content,
identityName: model.identity,
),
],
),
),

View File

@ -111,6 +111,7 @@ class DisplayName extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SelectableText(
minLines: 1,
maxLines: 2,
account.displayName,
style: usernameStyle,
@ -291,7 +292,10 @@ class _PostBodyState extends State<PostBody> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
PostTextRenderer(input: widget.content),
PostTextRenderer(
input: widget.content,
identityName: widget.model.identity,
),
MediaAttachments(models: widget.media),
],
),

View File

@ -5,10 +5,12 @@ import 'package:url_launcher/url_launcher.dart';
class PostTextRenderer extends StatelessWidget {
const PostTextRenderer({
required this.identityName,
required this.input,
Key? key,
}) : super(key: key);
final String input;
final String identityName;
@override
Widget build(BuildContext context) {