mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Prevent reloads when playlist item order changes
This commit is contained in:
@ -11,6 +11,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Utils;
|
||||
|
||||
namespace osu.Game.Online.Rooms
|
||||
{
|
||||
@ -101,13 +102,13 @@ namespace osu.Game.Online.Rooms
|
||||
|
||||
#endregion
|
||||
|
||||
public PlaylistItem With(IBeatmapInfo beatmap) => new PlaylistItem(beatmap)
|
||||
public PlaylistItem With(Optional<IBeatmapInfo> beatmap = default, Optional<ushort?> playlistOrder = default) => new PlaylistItem(beatmap.GetOr(Beatmap))
|
||||
{
|
||||
ID = ID,
|
||||
OwnerID = OwnerID,
|
||||
RulesetID = RulesetID,
|
||||
Expired = Expired,
|
||||
PlaylistOrder = PlaylistOrder,
|
||||
PlaylistOrder = playlistOrder.GetOr(PlaylistOrder),
|
||||
PlayedAt = PlayedAt,
|
||||
AllowedMods = AllowedMods,
|
||||
RequiredMods = RequiredMods,
|
||||
@ -119,6 +120,7 @@ namespace osu.Game.Online.Rooms
|
||||
&& Beatmap.OnlineID == other.Beatmap.OnlineID
|
||||
&& RulesetID == other.RulesetID
|
||||
&& Expired == other.Expired
|
||||
&& PlaylistOrder == other.PlaylistOrder
|
||||
&& AllowedMods.SequenceEqual(other.AllowedMods)
|
||||
&& RequiredMods.SequenceEqual(other.RequiredMods);
|
||||
}
|
||||
|
Reference in New Issue
Block a user