mirror of
				https://gitlab.com/comunic/comunicmobile
				synced 2025-11-04 04:04:18 +00:00 
			
		
		
		
	Show groups posts
This commit is contained in:
		@@ -6,6 +6,7 @@ import 'package:comunic/enums/post_visibility_level.dart';
 | 
			
		||||
import 'package:comunic/helpers/comments_helper.dart';
 | 
			
		||||
import 'package:comunic/helpers/likes_helper.dart';
 | 
			
		||||
import 'package:comunic/helpers/posts_helper.dart';
 | 
			
		||||
import 'package:comunic/lists/groups_list.dart';
 | 
			
		||||
import 'package:comunic/lists/users_list.dart';
 | 
			
		||||
import 'package:comunic/models/comment.dart';
 | 
			
		||||
import 'package:comunic/models/like_element.dart';
 | 
			
		||||
@@ -38,6 +39,7 @@ enum _PostActions { DELETE, UPDATE_CONTENT }
 | 
			
		||||
class PostTile extends StatefulWidget {
 | 
			
		||||
  final Post post;
 | 
			
		||||
  final UsersList usersInfo;
 | 
			
		||||
  final GroupsList groupsInfo;
 | 
			
		||||
  final void Function(Post) onDeletedPost;
 | 
			
		||||
  final bool showPostTarget;
 | 
			
		||||
 | 
			
		||||
@@ -47,10 +49,12 @@ class PostTile extends StatefulWidget {
 | 
			
		||||
    @required this.usersInfo,
 | 
			
		||||
    @required this.onDeletedPost,
 | 
			
		||||
    @required this.showPostTarget,
 | 
			
		||||
    @required this.groupsInfo,
 | 
			
		||||
  })  : assert(post != null),
 | 
			
		||||
        assert(usersInfo != null),
 | 
			
		||||
        assert(onDeletedPost != null),
 | 
			
		||||
        assert(showPostTarget != null),
 | 
			
		||||
        assert(groupsInfo != null),
 | 
			
		||||
        super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
@@ -85,7 +89,7 @@ class _PostTileState extends State<PostTile> {
 | 
			
		||||
 | 
			
		||||
    return " > " +
 | 
			
		||||
        (widget.post.isGroupPost
 | 
			
		||||
            ? "Group"
 | 
			
		||||
            ? widget.groupsInfo[widget.post.groupID].displayName
 | 
			
		||||
            : widget.usersInfo.getUser(widget.post.userPageID).displayName);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user