1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 00:55:29 +08:00

Add extra check to ensure closed rooms can't be closed harder

This commit is contained in:
Bartłomiej Dach
2024-11-22 09:54:56 +01:00
Unverified
parent 3b2f43012e
commit 69c2c988a1
@@ -26,6 +26,7 @@ using osu.Game.Input.Bindings;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Rooms;
using osu.Game.Online.Rooms.RoomStatuses;
using osu.Game.Overlays;
using osu.Game.Screens.OnlinePlay.Components;
using osu.Game.Screens.OnlinePlay.Lounge.Components;
@@ -167,7 +168,7 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
})
};
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now)
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && Room.Status is not RoomStatusEnded)
{
items.Add(new OsuMenuItem("Close playlist", MenuItemType.Destructive, () =>
{