Only lock the database for the duration of a deletion (#6363)

Only lock the database for the duration of a deletion
This commit is contained in:
Dean Herbert 2019-10-03 10:40:08 +08:00 committed by GitHub
commit cbdf42cd7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,8 +400,6 @@ namespace osu.Game.Database
int i = 0;
using (ContextFactory.GetForWrite())
{
foreach (var b in items)
{
if (notification.State == ProgressNotificationState.Cancelled)
@ -414,7 +412,6 @@ namespace osu.Game.Database
notification.Progress = (float)i / items.Count;
}
}
notification.State = ProgressNotificationState.Completed;
}
@ -439,8 +436,6 @@ namespace osu.Game.Database
int i = 0;
using (ContextFactory.GetForWrite())
{
foreach (var item in items)
{
if (notification.State == ProgressNotificationState.Cancelled)
@ -453,7 +448,6 @@ namespace osu.Game.Database
notification.Progress = (float)i / items.Count;
}
}
notification.State = ProgressNotificationState.Completed;
}