diff --git a/fastlane/metadata/android/en-US/changelogs/next.txt b/fastlane/metadata/android/en-US/changelogs/next.txt index 385edf56..a6dc62bd 100644 --- a/fastlane/metadata/android/en-US/changelogs/next.txt +++ b/fastlane/metadata/android/en-US/changelogs/next.txt @@ -19,4 +19,5 @@ * Fixed pinned tweets not appearing on profiles (#410) * Added support for some Discord embed addresses (fx/vxtwitter.com) (#436) * Tapping dates now switches between relative and absolute timestamps (#358) -* Added support for hiding NSFW tweets (#248) \ No newline at end of file +* Added support for hiding NSFW tweets (#248) +* Added follower and following counts back to profiles (#245) \ No newline at end of file diff --git a/lib/profile/profile.dart b/lib/profile/profile.dart index 2b89abab..0bb64973 100644 --- a/lib/profile/profile.dart +++ b/lib/profile/profile.dart @@ -273,6 +273,40 @@ class _ProfileScreenBodyState extends State with TickerProvid crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.end, children: [ + if (user.friendsCount != null) + Padding( + padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Icon(Icons.person, size: 12, color: Colors.white), + const SizedBox(width: 4), + Text.rich(TextSpan( + children: [ + TextSpan(text: '${widget.profile.user.friendsCount}', style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500)), + TextSpan(text: ' ${L10n.current.following.toLowerCase()}', style: const TextStyle(fontSize: 12)) + ] + )), + ], + ), + ), + if (user.followersCount != null) + Padding( + padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 0), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const Icon(Icons.person, size: 12, color: Colors.white), + const SizedBox(width: 4), + Text.rich(TextSpan( + children: [ + TextSpan(text: '${widget.profile.user.followersCount}', style: const TextStyle(fontSize: 12, fontWeight: FontWeight.w500)), + TextSpan(text: ' ${L10n.current.followers.toLowerCase()}', style: const TextStyle(fontSize: 12)) + ] + )), + ], + ), + ), if (user.location != null && user.location!.isNotEmpty) Padding( padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 0),