mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Change order of event firing in Update calls
A remove event should not be fired before the update is successful.
This commit is contained in:
parent
80806be047
commit
72da640059
@ -50,11 +50,10 @@ namespace osu.Game.Database
|
||||
/// <param name="item">The item to update.</param>
|
||||
public void Update(T item)
|
||||
{
|
||||
ItemRemoved?.Invoke(item);
|
||||
|
||||
using (var usage = ContextFactory.GetForWrite())
|
||||
usage.Context.Update(item);
|
||||
|
||||
ItemRemoved?.Invoke(item);
|
||||
ItemAdded?.Invoke(item);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user