mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Attempt to keep post create form
This commit is contained in:
		@@ -22,12 +22,14 @@ class GroupPostsSection extends StatefulWidget {
 | 
			
		||||
 | 
			
		||||
class _GroupPostsSectionState extends State<GroupPostsSection> {
 | 
			
		||||
  final _postsKey = GlobalKey<PostsListWidgetState>();
 | 
			
		||||
  final _formKey = GlobalKey<PostCreateFormWidgetState>();
 | 
			
		||||
 | 
			
		||||
  /// Add create post target
 | 
			
		||||
  Widget _buildPostCreationArea() {
 | 
			
		||||
    if (!widget.group.canCreatePost) return Container();
 | 
			
		||||
 | 
			
		||||
    return PostCreateFormWidget(
 | 
			
		||||
      key: _formKey,
 | 
			
		||||
      postTarget: PostTarget.GROUP_PAGE,
 | 
			
		||||
      targetID: widget.group.id,
 | 
			
		||||
      onCreated: () => _postsKey.currentState!.loadPostsList(getOlder: false),
 | 
			
		||||
 
 | 
			
		||||
@@ -38,10 +38,10 @@ class PostCreateFormWidget extends StatefulWidget {
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
  _PostCreateFormWidgetState createState() => _PostCreateFormWidgetState();
 | 
			
		||||
  PostCreateFormWidgetState createState() => PostCreateFormWidgetState();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
 | 
			
		||||
class PostCreateFormWidgetState extends State<PostCreateFormWidget> {
 | 
			
		||||
  // Helpers
 | 
			
		||||
  final PostsHelper _postHelper = PostsHelper();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user