Merge commit '3078e9788f5eaf9857e8355d84d22063f47b019b' into fluffychat-merge

pull/2245/head
ggurdin 5 months ago
commit ba5111c538
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

@ -328,6 +328,10 @@ class MessageContent extends StatelessWidget {
if (event.messageType == MessageTypes.Emote) { if (event.messageType == MessageTypes.Emote) {
html = '* $html'; html = '* $html';
} }
final bigEmotes = event.onlyEmotes &&
event.numberEmotes > 0 &&
event.numberEmotes <= 3;
return Padding( return Padding(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(
horizontal: 16, horizontal: 16,
@ -337,7 +341,9 @@ class MessageContent extends StatelessWidget {
html: html, html: html,
textColor: textColor, textColor: textColor,
room: event.room, room: event.room,
fontSize: AppConfig.fontSizeFactor * AppConfig.messageFontSize, fontSize: AppConfig.fontSizeFactor *
AppConfig.messageFontSize *
(bigEmotes ? 5 : 1),
limitHeight: !selected, limitHeight: !selected,
linkStyle: TextStyle( linkStyle: TextStyle(
color: linkColor, color: linkColor,

@ -156,7 +156,7 @@ class ClientChooserButton extends StatelessWidget {
var clientCount = 0; var clientCount = 0;
matrix.accountBundles.forEach((key, value) => clientCount += value.length); matrix.accountBundles.forEach((key, value) => clientCount += value.length);
return FutureBuilder<Profile>( return FutureBuilder<Profile>(
future: matrix.client.fetchOwnProfile(), future: matrix.client.isLogged() ? matrix.client.fetchOwnProfile() : null,
builder: (context, snapshot) => Material( builder: (context, snapshot) => Material(
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(99), borderRadius: BorderRadius.circular(99),
@ -171,7 +171,7 @@ class ClientChooserButton extends StatelessWidget {
child: Avatar( child: Avatar(
mxContent: snapshot.data?.avatarUrl, mxContent: snapshot.data?.avatarUrl,
name: name:
snapshot.data?.displayName ?? matrix.client.userID!.localpart, snapshot.data?.displayName ?? matrix.client.userID?.localpart,
size: 32, size: 32,
), ),
), ),

Loading…
Cancel
Save