mirror of
https://github.com/ppy/osu.git
synced 2025-03-24 19:17:20 +08:00
Adjust in line with upstream changes
This commit is contained in:
parent
0aa17a905b
commit
e8c0e27cc0
@ -26,7 +26,6 @@ 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;
|
||||
@ -168,7 +167,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 && Room.Status is not RoomStatusEnded)
|
||||
if (Room.Type == MatchType.Playlists && Room.Host?.Id == api.LocalUser.Value.Id && Room.StartDate?.AddMinutes(5) >= DateTimeOffset.Now && !Room.HasEnded)
|
||||
{
|
||||
items.Add(new OsuMenuItem("Close playlist", MenuItemType.Destructive, () =>
|
||||
{
|
||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Online.Rooms.RoomStatuses;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
@ -99,7 +98,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
|
||||
if (room.Host?.Id == api.LocalUser.Value.Id)
|
||||
{
|
||||
if (deletionGracePeriodRemaining > TimeSpan.Zero && room.Status is not RoomStatusEnded)
|
||||
if (deletionGracePeriodRemaining > TimeSpan.Zero && !room.HasEnded)
|
||||
{
|
||||
closeButton.FadeIn();
|
||||
using (BeginDelayedSequence(deletionGracePeriodRemaining.Value.TotalMilliseconds))
|
||||
|
@ -16,7 +16,6 @@ using osu.Game.Input;
|
||||
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.Screens.OnlinePlay.Components;
|
||||
using osu.Game.Screens.OnlinePlay.Match;
|
||||
using osu.Game.Screens.OnlinePlay.Match.Components;
|
||||
@ -286,11 +285,7 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
|
||||
DialogOverlay?.Push(new ClosePlaylistDialog(Room, () =>
|
||||
{
|
||||
var request = new ClosePlaylistRequest(Room.RoomID!.Value);
|
||||
request.Success += () =>
|
||||
{
|
||||
Room.Status = new RoomStatusEnded();
|
||||
Room.EndDate = DateTimeOffset.UtcNow;
|
||||
};
|
||||
request.Success += () => Room.EndDate = DateTimeOffset.UtcNow;
|
||||
API.Queue(request);
|
||||
}));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user