chore: Follow up chat design

This commit is contained in:
krille-chan 2024-05-30 14:55:41 +02:00
parent ea43ff7b4f
commit f2d42936ad
No known key found for this signature in database
2 changed files with 9 additions and 7 deletions

View file

@ -260,6 +260,8 @@ class Message extends StatelessWidget {
: displayname : displayname
.lightColorText), .lightColorText),
), ),
maxLines: 1,
overflow: TextOverflow.ellipsis,
); );
}, },
), ),

View file

@ -27,14 +27,13 @@ class TypingIndicators extends StatelessWidget {
final typingUsers = controller.room.typingUsers final typingUsers = controller.room.typingUsers
..removeWhere((u) => u.stateKey == Matrix.of(context).client.userID); ..removeWhere((u) => u.stateKey == Matrix.of(context).client.userID);
const bottomPadding = 4.0;
return Container( return Container(
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
child: AnimatedContainer( child: AnimatedContainer(
constraints: constraints:
const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 2.5), const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 2.5),
height: typingUsers.isEmpty ? 0 : avatarSize + bottomPadding, height: typingUsers.isEmpty ? 0 : avatarSize + 8,
duration: FluffyThemes.animationDuration, duration: FluffyThemes.animationDuration,
curve: FluffyThemes.animationCurve, curve: FluffyThemes.animationCurve,
alignment: controller.timeline!.events.isNotEmpty && alignment: controller.timeline!.events.isNotEmpty &&
@ -44,15 +43,16 @@ class TypingIndicators extends StatelessWidget {
: Alignment.topLeft, : Alignment.topLeft,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: const BoxDecoration(), decoration: const BoxDecoration(),
padding: const EdgeInsets.only( padding: const EdgeInsets.symmetric(
left: 8.0, horizontal: 8.0,
bottom: bottomPadding, vertical: 4.0,
), ),
child: Row( child: Row(
children: [ children: [
SizedBox( Container(
alignment: Alignment.center,
height: avatarSize, height: avatarSize,
width: typingUsers.length < 2 ? avatarSize : avatarSize + 16, width: Avatar.defaultSize,
child: Stack( child: Stack(
children: [ children: [
if (typingUsers.isNotEmpty) if (typingUsers.isNotEmpty)