mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Merge pull request #15080 from smoogipoo/remove-room-position
Remove stored position from room model
This commit is contained in:
commit
3b766a4568
@ -130,12 +130,6 @@ namespace osu.Game.Online.Rooms
|
||||
set => MaxAttempts.Value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The position of this <see cref="Room"/> in the list. This is not read from or written to the API.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public readonly Bindable<long> Position = new Bindable<long>(-1); // Todo: This does not need to exist.
|
||||
|
||||
public Room()
|
||||
{
|
||||
Password.BindValueChanged(p => HasPassword.Value = !string.IsNullOrEmpty(p.NewValue));
|
||||
@ -192,8 +186,6 @@ namespace osu.Game.Online.Rooms
|
||||
RecentParticipants.Clear();
|
||||
RecentParticipants.AddRange(other.RecentParticipants);
|
||||
}
|
||||
|
||||
Position.Value = other.Position.Value;
|
||||
}
|
||||
|
||||
public void RemoveExpiredPlaylistItems()
|
||||
|
@ -116,8 +116,6 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
if (ignoredRooms.Contains(room.RoomID.Value.Value))
|
||||
return;
|
||||
|
||||
room.Position.Value = -room.RoomID.Value.Value;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var pi in room.Playlist)
|
||||
|
@ -129,7 +129,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
|
||||
private void updateSorting()
|
||||
{
|
||||
foreach (var room in roomFlow)
|
||||
roomFlow.SetLayoutPosition(room, room.Room.Position.Value);
|
||||
roomFlow.SetLayoutPosition(room, -(room.Room.RoomID.Value ?? 0));
|
||||
}
|
||||
|
||||
protected override bool OnClick(ClickEvent e)
|
||||
|
Loading…
Reference in New Issue
Block a user