mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 12:14:11 +00:00 
			
		
		
		
	Fix issue on posts list not refreshing when a new post is created
This commit is contained in:
		@@ -29,6 +29,7 @@ class _UserPostsSectionState extends State<UserPostsSection> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  @override
 | 
					  @override
 | 
				
			||||||
  Widget build(BuildContext context) => PostsListWidget(
 | 
					  Widget build(BuildContext context) => PostsListWidget(
 | 
				
			||||||
 | 
					        key: _postsKey,
 | 
				
			||||||
        topWidgets: [
 | 
					        topWidgets: [
 | 
				
			||||||
          widget.user.canPostTexts
 | 
					          widget.user.canPostTexts
 | 
				
			||||||
              ? PostCreateFormWidget(
 | 
					              ? PostCreateFormWidget(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -382,9 +382,9 @@ class _PostCreateFormWidgetState extends State<PostCreateFormWidget> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      this._resetForm();
 | 
					      this._resetForm();
 | 
				
			||||||
      widget.onCreated();
 | 
					      widget.onCreated();
 | 
				
			||||||
    } catch (e) {
 | 
					    } catch (e, s) {
 | 
				
			||||||
      setState(() => _isCreating = false);
 | 
					      setState(() => _isCreating = false);
 | 
				
			||||||
      print("Error while creating post : " + e.toString());
 | 
					      print("Error while creating post : $e $s");
 | 
				
			||||||
      showSimpleSnack(context, tr("Could not create post !"));
 | 
					      showSimpleSnack(context, tr("Could not create post !"));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user