mirror of
https://github.com/ppy/osu.git
synced 2026-05-20 21:40:44 +08:00
Fix duration by having it update on Beatmap creation
This commit is contained in:
@@ -99,15 +99,18 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
private readonly PlaylistItem item;
|
||||
private double itemLength;
|
||||
private int beatmapSetId;
|
||||
[Resolved]
|
||||
private RealmAccess realm { get; set; } = null!;
|
||||
|
||||
public DifficultySelectFilterControl(PlaylistItem item)
|
||||
{
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(RealmAccess realm)
|
||||
public override FilterCriteria CreateCriteria()
|
||||
{
|
||||
var criteria = base.CreateCriteria();
|
||||
|
||||
realm.Run(r =>
|
||||
{
|
||||
int beatmapId = item.Beatmap.OnlineID;
|
||||
@@ -116,11 +119,6 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
itemLength = beatmap?.Length ?? 0;
|
||||
beatmapSetId = beatmap?.BeatmapSet?.OnlineID ?? 0;
|
||||
});
|
||||
}
|
||||
|
||||
public override FilterCriteria CreateCriteria()
|
||||
{
|
||||
var criteria = base.CreateCriteria();
|
||||
|
||||
// Must be from the same set as the playlist item.
|
||||
criteria.BeatmapSetId = beatmapSetId;
|
||||
|
||||
Reference in New Issue
Block a user