mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
General refactorings
This commit is contained in:
@ -21,7 +21,7 @@ namespace osu.Game.Collections
|
||||
public class BeatmapCollectionManager : CompositeDrawable
|
||||
{
|
||||
/// <summary>
|
||||
/// Database version in YYYYMMDD format (matching stable).
|
||||
/// Database version in stable-compatible YYYYMMDD format.
|
||||
/// </summary>
|
||||
private const int database_version = 30000000;
|
||||
|
||||
@ -213,29 +213,4 @@ namespace osu.Game.Collections
|
||||
save();
|
||||
}
|
||||
}
|
||||
|
||||
public class BeatmapCollection
|
||||
{
|
||||
/// <summary>
|
||||
/// Invoked whenever any change occurs on this <see cref="BeatmapCollection"/>.
|
||||
/// </summary>
|
||||
public event Action Changed;
|
||||
|
||||
public readonly Bindable<string> Name = new Bindable<string>();
|
||||
|
||||
public readonly BindableList<BeatmapInfo> Beatmaps = new BindableList<BeatmapInfo>();
|
||||
|
||||
public DateTimeOffset LastModifyTime { get; private set; }
|
||||
|
||||
public BeatmapCollection()
|
||||
{
|
||||
LastModifyTime = DateTimeOffset.UtcNow;
|
||||
|
||||
Beatmaps.CollectionChanged += (_, __) =>
|
||||
{
|
||||
LastModifyTime = DateTimeOffset.Now;
|
||||
Changed?.Invoke();
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user