Improve song selection layout, database loading

Also adds event that notifes the song select when a beatmap is added.
This commit is contained in:
Drew DeVault
2016-10-11 13:52:16 -04:00
parent a14edc06c8
commit 674f624bfc
3 changed files with 23 additions and 11 deletions

View File

@ -16,6 +16,7 @@ namespace osu.Game.Database
{
private static SQLiteConnection connection { get; set; }
private BasicStorage storage;
public event Action<BeatmapSetInfo> BeatmapSetAdded;
public BeatmapDatabase(BasicStorage storage)
{
@ -75,6 +76,7 @@ namespace osu.Game.Database
connection.Insert(beatmapSet);
beatmapSet.BeatmapMetadataID = connection.Insert(metadata);
connection.UpdateWithChildren(beatmapSet);
BeatmapSetAdded?.Invoke(beatmapSet);
}
public ArchiveReader GetReader(BeatmapSetInfo beatmapSet)