more fix
This commit is contained in:
@@ -6,12 +6,9 @@ namespace AipsRT.Model.Whiteboard;
|
||||
public class Whiteboard
|
||||
{
|
||||
public Guid WhiteboardId { get; set; }
|
||||
|
||||
|
||||
public Guid OwnerId { get; set; }
|
||||
|
||||
public HashSet<Guid> AcceptedUsers { get; } = new();
|
||||
public HashSet<Guid> PendingUsers { get; } = new();
|
||||
|
||||
|
||||
public List<User> Users { get; } = [];
|
||||
|
||||
public List<Shape> Shapes { get; } = [];
|
||||
@@ -26,36 +23,24 @@ public class Whiteboard
|
||||
Shapes.Add(shape);
|
||||
Rectangles.Add(shape);
|
||||
}
|
||||
|
||||
|
||||
public void AddArrow(Arrow shape)
|
||||
{
|
||||
Shapes.Add(shape);
|
||||
Arrows.Add(shape);
|
||||
}
|
||||
|
||||
|
||||
public void AddLine(Line shape)
|
||||
{
|
||||
Shapes.Add(shape);
|
||||
Lines.Add(shape);
|
||||
}
|
||||
|
||||
|
||||
public void AddTextShape(TextShape shape)
|
||||
{
|
||||
Shapes.Add(shape);
|
||||
TextShapes.Add(shape);
|
||||
}
|
||||
|
||||
|
||||
public void AddUser(User user) => Users.Add(user);
|
||||
|
||||
public void AddPendingUser(Guid userId) => PendingUsers.Add(userId);
|
||||
|
||||
public void AcceptUser(Guid userId)
|
||||
{
|
||||
PendingUsers.Remove(userId);
|
||||
AcceptedUsers.Add(userId);
|
||||
}
|
||||
|
||||
public void RejectUser(Guid userId) => PendingUsers.Remove(userId);
|
||||
|
||||
public bool IsAccepted(Guid userId) => AcceptedUsers.Contains(userId);
|
||||
}
|
||||
Reference in New Issue
Block a user