Make Contact Row Layout More Consistent
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
Sarah Jamie Lewis 2024-02-09 09:56:03 -08:00
parent 907cc262bb
commit cd476f39c0
1 changed files with 19 additions and 10 deletions

View File

@ -82,14 +82,15 @@ class _ContactRowState extends State<ContactRow> {
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Container(
height: 24,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
height: Provider.of<Settings>(context).fontScaling * 14.0 + 10.0,
decoration: BoxDecoration(), decoration: BoxDecoration(),
child: Text( child: Text(
contact.augmentedNickname(context) + (contact.messageDraft.isEmpty() ? "" : "*"), contact.augmentedNickname(context).trim() + (contact.messageDraft.isEmpty() ? "" : "*"),
style: TextStyle( style: TextStyle(
fontSize: Provider.of<Settings>(context).fontScaling * 14.0, fontSize: Provider.of<Settings>(context).fontScaling * 14.0,
fontFamily: "Inter", fontFamily: "Inter",
@ -101,13 +102,11 @@ class _ContactRowState extends State<ContactRow> {
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
maxLines: 1, maxLines: 1,
)), )),
syncStatus ?? Container(), syncStatus ??
Visibility( SizedBox(
visible: !Provider.of<Settings>(context).streamerMode, width: 0,
child: Text(contact.onion, height: 0,
overflow: TextOverflow.ellipsis, ),
style: TextStyle(color: contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor : Provider.of<Settings>(context).theme.mainTextColor)),
),
// we need to ignore the child widget in this context, otherwise gesture events will flow down... // we need to ignore the child widget in this context, otherwise gesture events will flow down...
IgnorePointer( IgnorePointer(
ignoring: true, ignoring: true,
@ -121,6 +120,7 @@ class _ContactRowState extends State<ContactRow> {
)), )),
Container( Container(
padding: EdgeInsets.all(0), padding: EdgeInsets.all(0),
height: Provider.of<Settings>(context).fontScaling * 14.0 + 10.0,
child: contact.isInvitation == true child: contact.isInvitation == true
? Wrap(alignment: WrapAlignment.start, direction: Axis.vertical, children: <Widget>[ ? Wrap(alignment: WrapAlignment.start, direction: Axis.vertical, children: <Widget>[
Padding( Padding(
@ -161,6 +161,15 @@ class _ContactRowState extends State<ContactRow> {
) )
: Text(prettyDateString(context, widget.messageIndex == null ? contact.lastMessageSentTime : (this.cachedMessage?.getMetadata().timestamp ?? DateTime.now())))), : Text(prettyDateString(context, widget.messageIndex == null ? contact.lastMessageSentTime : (this.cachedMessage?.getMetadata().timestamp ?? DateTime.now())))),
), ),
Visibility(
visible: !Provider.of<Settings>(context).streamerMode,
child: Text(
contact.onion,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: ((contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor : Provider.of<Settings>(context).theme.mainTextColor) as Color)
.withOpacity(0.8)),
)),
], ],
))), ))),
Visibility( Visibility(