1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00

Fix issue

This commit is contained in:
Pierre HUBERT 2020-04-17 10:37:02 +02:00
parent bffdab1423
commit 414f81b32f
2 changed files with 5 additions and 5 deletions

View File

@ -112,7 +112,7 @@ class _AuthorizedGroupPageScreenState extends State<AuthorizedGroupPageScreen> {
return PostCreateFormWidget( return PostCreateFormWidget(
postTarget: PostTarget.GROUP_PAGE, postTarget: PostTarget.GROUP_PAGE,
targetID: _group.id, targetID: _group.id,
onCreated: () => widget.needRefresh()); onCreated: () => _postsKey.currentState.loadPostsList(getOlder: false));
} }
/// Build the list of posts of the group /// Build the list of posts of the group

View File

@ -66,7 +66,7 @@ class PostsListWidgetState extends State<PostsListWidget> {
@override @override
void didChangeDependencies() { void didChangeDependencies() {
super.didChangeDependencies(); super.didChangeDependencies();
_loadPostsList(); loadPostsList();
} }
void _loadError() { void _loadError() {
@ -75,7 +75,7 @@ class PostsListWidgetState extends State<PostsListWidget> {
} }
/// Load the list of posts /// Load the list of posts
Future<void> _loadPostsList({bool getOlder = false}) async { Future<void> loadPostsList({bool getOlder = false}) async {
if (_loading) return; if (_loading) return;
_loading = true; _loading = true;
@ -131,7 +131,7 @@ class PostsListWidgetState extends State<PostsListWidget> {
itemBuilder: _buildItem, itemBuilder: _buildItem,
controller: _scrollController, controller: _scrollController,
), ),
onRefresh: () => _loadPostsList(), onRefresh: () => loadPostsList(),
); );
} }
@ -166,6 +166,6 @@ class PostsListWidgetState extends State<PostsListWidget> {
void _removePost(Post post) => setState(() => _list.remove(post)); void _removePost(Post post) => setState(() => _list.remove(post));
void reachedPostsBottom() { void reachedPostsBottom() {
if (widget.getOlder != null) _loadPostsList(getOlder: true); if (widget.getOlder != null) loadPostsList(getOlder: true);
} }
} }