Ensure undeleted items are populated with includes before firing events

This commit is contained in:
Dean Herbert
2018-02-15 15:51:59 +09:00
parent e51450a064
commit 671475f3b4
2 changed files with 4 additions and 5 deletions

View File

@ -53,7 +53,6 @@ namespace osu.Game.Database
Refresh(ref item);
if (item.DeletePending) return false;
item.DeletePending = true;
}
@ -65,10 +64,9 @@ namespace osu.Game.Database
{
using (ContextFactory.GetForWrite())
{
Refresh(ref item);
Refresh(ref item, ConsumableItems);
if (!item.DeletePending) return false;
item.DeletePending = false;
}
@ -76,6 +74,8 @@ namespace osu.Game.Database
return true;
}
protected virtual IQueryable<T> AddIncludesForConsumption(IQueryable<T> query) => query;
protected virtual IQueryable<T> AddIncludesForDeletion(IQueryable<T> query) => query;
protected virtual void Purge(List<T> items, OsuDbContext context)