diff --git a/lib/app/features/user/pages/profile_page/components/profile_details/followers_you_know/followed_by_text.dart b/lib/app/features/user/pages/profile_page/components/profile_details/followers_you_know/followed_by_text.dart index 086a93322..23167a473 100644 --- a/lib/app/features/user/pages/profile_page/components/profile_details/followers_you_know/followed_by_text.dart +++ b/lib/app/features/user/pages/profile_page/components/profile_details/followers_you_know/followed_by_text.dart @@ -51,38 +51,32 @@ class FollowedByText extends HookConsumerWidget { color: context.theme.appColors.darkBlue, ); - final textSpans = [ - TextSpan( - text: context.i18n.profile_followed_by, - style: defaultStyle, - ), - TextSpan( - text: firstUserMetadata.data.displayName, - style: actionableStyle, - recognizer: userTapRecognizer, - ), - ]; - - if (pubkeys.length > 1) { - textSpans - ..add( - TextSpan( - text: context.i18n.profile_followed_by_and, - style: defaultStyle, - ), - ) - ..add( - TextSpan( - text: context.i18n.profile_followed_by_and_others, - style: actionableStyle, - recognizer: othersTapRecognizer, - ), - ); - } - return Expanded( child: RichText( - text: TextSpan(children: textSpans), + text: TextSpan( + children: [ + TextSpan( + text: context.i18n.profile_followed_by, + style: defaultStyle, + ), + TextSpan( + text: firstUserMetadata.data.displayName, + style: actionableStyle, + recognizer: userTapRecognizer, + ), + if (pubkeys.length > 1) ...[ + TextSpan( + text: context.i18n.profile_followed_by_and, + style: defaultStyle, + ), + TextSpan( + text: context.i18n.profile_followed_by_and_others, + style: actionableStyle, + recognizer: othersTapRecognizer, + ), + ], + ], + ), textScaler: MediaQuery.textScalerOf(context), maxLines: 2, overflow: TextOverflow.ellipsis,