Skip to content

Commit

Permalink
Merge pull request #24 from syonfoppen/fix-buggy-user-stuff
Browse files Browse the repository at this point in the history
Fix buggy user stuff
  • Loading branch information
DavidLaRoi committed Mar 11, 2024
2 parents 04fe173 + c568fd3 commit 24c7c24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/Estiblazor.UI/Estiblazor.UI/Components/Pages/Rooms.razor
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@

@foreach (var user in Room.Users)
{
<UserChoicesView RoomName="@Room.Name" UserId="@user.Id" />
<UserChoicesView @key=@user.Id RoomName="@Room.Name" UserId="@user.Id" />
}



</div>
</div>

Expand Down Expand Up @@ -114,6 +112,5 @@
public void Dispose()
{
Room.PropertyChanged -= Room_PropertyChanged;
Room.RemoveUser(User);
}
}
1 change: 1 addition & 0 deletions src/Estiblazor.UI/Estiblazor.UI/Services/Users/User.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public void DecreaseOnline()

public void SetRoom(RoomViewModel? room)
{
if (CurrentRoom == room) return;
CurrentRoom?.RemoveUser(this);
CurrentRoom = room;
CurrentRoom?.AddUser(this);
Expand Down

0 comments on commit 24c7c24

Please sign in to comment.