mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-21 20:39:22 +00:00
Show post visibility levels
This commit is contained in:
parent
59c3e47419
commit
57cf1d5da1
@ -1,5 +1,15 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Post visibility level
|
||||
///
|
||||
/// @author Pierre HUBERT
|
||||
|
||||
enum PostVisibilityLevel { PUBLIC, FRIENDS, USER, GROUP_MEMBERS }
|
||||
|
||||
/// Post visibility levels mapping with material icons
|
||||
const PostVisibilityLevelsMapIcons = {
|
||||
PostVisibilityLevel.USER: Icons.lock,
|
||||
PostVisibilityLevel.FRIENDS: Icons.group,
|
||||
PostVisibilityLevel.GROUP_MEMBERS: Icons.group,
|
||||
PostVisibilityLevel.PUBLIC: Icons.public
|
||||
};
|
||||
|
@ -2,6 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:comunic/enums/likes_type.dart';
|
||||
import 'package:comunic/enums/post_kind.dart';
|
||||
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';
|
||||
@ -97,6 +98,14 @@ class _PostTileState extends State<PostTile> {
|
||||
),
|
||||
),
|
||||
|
||||
PopupMenuButton(
|
||||
child: Icon(
|
||||
PostVisibilityLevelsMapIcons[widget.post.visibilityLevel],
|
||||
color: Colors.grey,
|
||||
),
|
||||
itemBuilder: (c) => [],
|
||||
),
|
||||
|
||||
PopupMenuButton<_PostActions>(
|
||||
itemBuilder: (c) => [
|
||||
// Update post content
|
||||
|
Loading…
Reference in New Issue
Block a user