mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-26 04:48:51 +00:00
Fix issue
This commit is contained in:
parent
bffdab1423
commit
414f81b32f
@ -112,7 +112,7 @@ class _AuthorizedGroupPageScreenState extends State<AuthorizedGroupPageScreen> {
|
||||
return PostCreateFormWidget(
|
||||
postTarget: PostTarget.GROUP_PAGE,
|
||||
targetID: _group.id,
|
||||
onCreated: () => widget.needRefresh());
|
||||
onCreated: () => _postsKey.currentState.loadPostsList(getOlder: false));
|
||||
}
|
||||
|
||||
/// Build the list of posts of the group
|
||||
|
@ -66,7 +66,7 @@ class PostsListWidgetState extends State<PostsListWidget> {
|
||||
@override
|
||||
void didChangeDependencies() {
|
||||
super.didChangeDependencies();
|
||||
_loadPostsList();
|
||||
loadPostsList();
|
||||
}
|
||||
|
||||
void _loadError() {
|
||||
@ -75,7 +75,7 @@ class PostsListWidgetState extends State<PostsListWidget> {
|
||||
}
|
||||
|
||||
/// Load the list of posts
|
||||
Future<void> _loadPostsList({bool getOlder = false}) async {
|
||||
Future<void> loadPostsList({bool getOlder = false}) async {
|
||||
if (_loading) return;
|
||||
|
||||
_loading = true;
|
||||
@ -131,7 +131,7 @@ class PostsListWidgetState extends State<PostsListWidget> {
|
||||
itemBuilder: _buildItem,
|
||||
controller: _scrollController,
|
||||
),
|
||||
onRefresh: () => _loadPostsList(),
|
||||
onRefresh: () => loadPostsList(),
|
||||
);
|
||||
}
|
||||
|
||||
@ -166,6 +166,6 @@ class PostsListWidgetState extends State<PostsListWidget> {
|
||||
void _removePost(Post post) => setState(() => _list.remove(post));
|
||||
|
||||
void reachedPostsBottom() {
|
||||
if (widget.getOlder != null) _loadPostsList(getOlder: true);
|
||||
if (widget.getOlder != null) loadPostsList(getOlder: true);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user