Skip to content

Commit

Permalink
fixed issue with loading indicator present on some communities with l…
Browse files Browse the repository at this point in the history
…ittle posts
  • Loading branch information
hjiangsu committed Jun 16, 2023
1 parent 89144c3 commit 72c48e9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
### Changed
- Initial feed now shows a compact version of an image, rather than the full height image

### Fixed
- Fixed issue where if you log in with an instance that does not exist, the community page will indefinitely load
- Fixed issue where a community would show a loading indicator if there were too little posts within that community

## 0.1.0-alpha - 2023-06-15
### Added
- Sorting post feed by hot, active, etc.
Expand Down
2 changes: 1 addition & 1 deletion lib/community/bloc/community_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class CommunityBloc extends Bloc<CommunityEvent, CommunityState> {
postViews: posts,
listingType: event.listingType ?? ListingType.Local,
communityId: event.communityId,
hasReachedEnd: posts.isEmpty,
hasReachedEnd: posts.isEmpty || posts.length < 15,
));
} else {
if (state.hasReachedEnd) return emit(state.copyWith(status: CommunityStatus.success));
Expand Down
16 changes: 15 additions & 1 deletion lib/community/widgets/community_drawer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,21 @@ class _CommunityDrawerState extends State<CommunityDrawer> {

Navigator.of(context).pop();
},
child: Text(context.read<AccountBloc>().state.subsciptions[index].community.name),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
context.read<AccountBloc>().state.subsciptions[index].community.title,
overflow: TextOverflow.ellipsis,
maxLines: 1,
),
Text(
context.read<AccountBloc>().state.subsciptions[index].community.name,
style: theme.textTheme.bodyMedium,
)
],
),
);
}),
),
Expand Down

0 comments on commit 72c48e9

Please sign in to comment.