add infinite post list to instance page

This commit is contained in:
krawieck 2020-09-28 22:41:40 +02:00
parent 1d7a5fbf0a
commit 82a739b203
1 changed files with 9 additions and 5 deletions

View File

@ -13,6 +13,7 @@ import '../util/text_color.dart';
import '../widgets/badge.dart';
import '../widgets/bottom_modal.dart';
import '../widgets/fullscreenable_image.dart';
import '../widgets/infinite_post_list.dart';
import '../widgets/markdown_text.dart';
import 'communities_list.dart';
import 'users_list.dart';
@ -212,11 +213,14 @@ class InstancePage extends HookWidget {
],
body: TabBarView(
children: [
ListView(
children: [
Center(child: Text('posts go here')),
],
),
InfinitePostList(
fetcher: (page, batchSize, sort) =>
LemmyApi(instanceUrl).v1.getPosts(
// TODO: switch between all and subscribed
type: PostListingType.all,
sort: sort,
page: page,
)),
ListView(
children: [
Center(child: Text('comments go here')),