mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add beatmap deletion support.
Note that this is a very naive approach and will result in file access exceptions. This will be fixed in a further commit.
This commit is contained in:
@ -254,14 +254,16 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
progress.IsEnabled = (beatmapSource.Value != null);
|
||||
if (beatmapSource.Value == current) return;
|
||||
bool audioEquals = current?.BeatmapInfo.AudioEquals(beatmapSource.Value.BeatmapInfo) ?? false;
|
||||
bool audioEquals = current?.BeatmapInfo?.AudioEquals(beatmapSource?.Value?.BeatmapInfo) ?? false;
|
||||
current = beatmapSource.Value;
|
||||
updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Next);
|
||||
appendToHistory(current.BeatmapInfo);
|
||||
appendToHistory(current?.BeatmapInfo);
|
||||
}
|
||||
|
||||
private void appendToHistory(BeatmapInfo beatmap)
|
||||
{
|
||||
if (beatmap == null) return;
|
||||
|
||||
if (playHistoryIndex >= 0)
|
||||
{
|
||||
if (beatmap.AudioEquals(playHistory[playHistoryIndex]))
|
||||
|
Reference in New Issue
Block a user