Merge branch 'master' into muted-notification

This commit is contained in:
Craftplacer
2019-10-03 12:51:22 +02:00
committed by GitHub
2 changed files with 28 additions and 22 deletions

View File

@ -239,6 +239,18 @@ namespace osu.Game.Tests.Visual.SongSelect
AddAssert("Selection is non-null", () => currentSelection != null);
setSelected(1, 3);
}
[Test]
public void TestFilterRange()
{
loadBeatmaps();
// buffer the selection
setSelected(3, 2);
setSelected(1, 3);
AddStep("Apply a range filter", () => carousel.Filter(new FilterCriteria
{
SearchText = "#3",
@ -249,9 +261,9 @@ namespace osu.Game.Tests.Visual.SongSelect
IsLowerInclusive = true
}
}, false));
waitForSelection(3, 2);
AddStep("Un-filter", () => carousel.Filter(new FilterCriteria(), false));
// should reselect the buffered selection.
waitForSelection(3, 2);
}
/// <summary>

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;
}