Merge pull request #3030 from pangeachat/2981-long-name-mention-overflow

chore: convert matrix mention widget into richtext
pull/2245/head
ggurdin 5 months ago committed by GitHub
commit d647e3427a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -893,30 +893,56 @@ class MatrixPill extends StatelessWidget {
return InkWell( return InkWell(
splashColor: Colors.transparent, splashColor: Colors.transparent,
onTap: UrlLauncher(outerContext, uri).launchUrl, onTap: UrlLauncher(outerContext, uri).launchUrl,
child: Row( // #Pangea
mainAxisSize: MainAxisSize.min, child: RichText(
children: [ textScaler: TextScaler.noScaling,
Avatar( text: TextSpan(
mxContent: avatar, children: [
name: name, WidgetSpan(
size: 16, alignment: PlaceholderAlignment.middle,
// #Pangea child: Avatar(
userId: userId, mxContent: avatar,
// Pangea# name: name,
), size: 16,
const SizedBox(width: 6), userId: userId,
Text( ),
name,
style: TextStyle(
color: color,
decorationColor: color,
decoration: TextDecoration.underline,
fontSize: fontSize,
height: 1.25,
), ),
), const WidgetSpan(child: SizedBox(width: 6)),
], TextSpan(
text: name,
style: TextStyle(
color: color,
decorationColor: color,
decoration: TextDecoration.underline,
fontSize: fontSize,
height: 1.25,
),
),
],
),
), ),
// child: Row(
// mainAxisSize: MainAxisSize.min,
// children: [
// Avatar(
// mxContent: avatar,
// name: name,
// size: 16,
// ),
// const SizedBox(width: 6),
// Text(
// name,
// style: TextStyle(
// color: color,
// decorationColor: color,
// decoration: TextDecoration.underline,
// fontSize: fontSize,
// height: 1.25,
// ),
// ),
// ],
// ),
// Pangea#
); );
} }
} }

Loading…
Cancel
Save