Skip to content

Commit

Permalink
Added follower and following counts back to profiles. Fixes #245
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjomckay committed Sep 4, 2022
1 parent ad63492 commit 6c227a5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fastlane/metadata/android/en-US/changelogs/next.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
* Added support for hiding NSFW tweets (#248)
* Added follower and following counts back to profiles (#245)
34 changes: 34 additions & 0 deletions lib/profile/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,40 @@ class _ProfileScreenBodyState extends State<ProfileScreenBody> 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),
Expand Down

0 comments on commit 6c227a5

Please sign in to comment.