Merge branch 'krille/minor-design-fixes' into 'main'

chore: Minor design changes

See merge request famedly/fluffychat!570
This commit is contained in:
Krille Fear 2021-11-22 18:09:49 +00:00
commit 9fa71dc70b
2 changed files with 13 additions and 13 deletions

View File

@ -44,15 +44,6 @@ class MessageReactions extends StatelessWidget {
final reactionList = reactionMap.values.toList(); final reactionList = reactionMap.values.toList();
reactionList.sort((a, b) => b.count - a.count > 0 ? 1 : -1); reactionList.sort((a, b) => b.count - a.count > 0 ? 1 : -1);
return Wrap(spacing: 4.0, runSpacing: 4.0, children: [ return Wrap(spacing: 4.0, runSpacing: 4.0, children: [
if (allReactionEvents.any((e) => e.status.isSending))
const SizedBox(
width: 28,
height: 28,
child: Padding(
padding: EdgeInsets.all(4.0),
child: CircularProgressIndicator.adaptive(strokeWidth: 1),
),
),
...reactionList ...reactionList
.map( .map(
(r) => _Reaction( (r) => _Reaction(
@ -86,6 +77,15 @@ class MessageReactions extends StatelessWidget {
), ),
) )
.toList(), .toList(),
if (allReactionEvents.any((e) => e.status.isSending))
const SizedBox(
width: 28,
height: 28,
child: Padding(
padding: EdgeInsets.all(4.0),
child: CircularProgressIndicator.adaptive(strokeWidth: 1),
),
),
]); ]);
} }
} }

View File

@ -33,8 +33,8 @@ class TypingIndicators extends StatelessWidget {
: Alignment.topLeft, : Alignment.topLeft,
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: const BoxDecoration(), decoration: const BoxDecoration(),
padding: EdgeInsets.only( padding: const EdgeInsets.only(
left: typingUsers.length < 2 ? 8 : 0, left: 8.0,
bottom: bottomPadding, bottom: bottomPadding,
), ),
child: Row( child: Row(
@ -43,7 +43,7 @@ class TypingIndicators extends StatelessWidget {
height: Avatar.defaultSize, height: Avatar.defaultSize,
width: typingUsers.length < 2 width: typingUsers.length < 2
? Avatar.defaultSize ? Avatar.defaultSize
: Avatar.defaultSize + 8, : Avatar.defaultSize + 16,
child: Stack( child: Stack(
children: [ children: [
if (typingUsers.isNotEmpty) if (typingUsers.isNotEmpty)
@ -53,7 +53,7 @@ class TypingIndicators extends StatelessWidget {
), ),
if (typingUsers.length == 2) if (typingUsers.length == 2)
Padding( Padding(
padding: const EdgeInsets.only(left: 8), padding: const EdgeInsets.only(left: 16),
child: Avatar( child: Avatar(
mxContent: typingUsers.length == 2 mxContent: typingUsers.length == 2
? typingUsers.last.avatarUrl ? typingUsers.last.avatarUrl