Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #166 from krawieck/fix/private-follows
Browse files Browse the repository at this point in the history
  • Loading branch information
krawieck authored Feb 25, 2021
2 parents d516e63 + ce9c033 commit 8ffe979
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ WARNING: due to some internal changes your local settings will be reset (logged
- Titles on some pages, have an appear affect when scrolling down
- Long pressing comments now has a ripple effect
- Nerd stuff now contains more nerd stuff
- Communities that a user follows will no longer appear on a user's profile in most scenarios

### Fixed

Expand Down
1 change: 1 addition & 0 deletions lib/pages/communities_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class CommunitiesTab extends HookWidget {
savedOnly: false,
userId:
accountsStore.defaultTokenFor(instanceHost).payload.id,
auth: accountsStore.defaultTokenFor(instanceHost).raw,
))
.then((e) => e.follows),
)
Expand Down
27 changes: 9 additions & 18 deletions lib/widgets/user_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -388,32 +388,23 @@ class _AboutTab extends HookWidget {
..sort((a, b) => a.community.name.compareTo(b.community.name)))
communityTile(
comm.community.name, comm.community.icon, comm.community.id),
divider
divider,
],
ListTile(
title: Center(
child: Text(
'Subscribed:',
style: theme.textTheme.headline6.copyWith(fontSize: 18),
if (userDetails.follows.isNotEmpty) ...[
ListTile(
title: Center(
child: Text(
'Subscribed:',
style: theme.textTheme.headline6.copyWith(fontSize: 18),
),
),
),
),
if (userDetails.follows.isNotEmpty)
for (final comm
in userDetails.follows
..sort((a, b) => a.community.name.compareTo(b.community.name)))
communityTile(
comm.community.name, comm.community.icon, comm.community.id)
else
const Padding(
padding: EdgeInsets.only(top: 8),
child: Center(
child: Text(
'this user does not subscribe to any community',
style: TextStyle(fontStyle: FontStyle.italic),
),
),
)
]
],
);
}
Expand Down

0 comments on commit 8ffe979

Please sign in to comment.