mirror of https://github.com/ppy/osu
Fix most remaining test issues
This commit is contained in:
parent
b7ee6d1866
commit
7dba3c3551
|
@ -50,6 +50,7 @@ private void load(GameHost host, AudioManager audio)
|
|||
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
|
||||
Dependencies.Cache(manager = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
|
||||
Dependencies.Cache(new OsuConfigManager(LocalStorage));
|
||||
Dependencies.Cache(ContextFactory);
|
||||
|
||||
manager.Import(TestResources.GetQuickTestBeatmapForImport()).WaitSafely();
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@ private void load(GameHost host, AudioManager audio)
|
|||
{
|
||||
Dependencies.Cache(rulesets = new RulesetStore(ContextFactory));
|
||||
Dependencies.Cache(beatmaps = new BeatmapManager(LocalStorage, ContextFactory, rulesets, null, audio, Resources, host, Beatmap.Default));
|
||||
Dependencies.Cache(ContextFactory);
|
||||
}
|
||||
|
||||
public override void SetUpSteps()
|
||||
|
|
|
@ -90,7 +90,7 @@ protected override void LoadComplete()
|
|||
|
||||
private void updateAvailability()
|
||||
{
|
||||
if (downloadTracker == null)
|
||||
if (downloadTracker == null || SelectedItem.Value == null)
|
||||
return;
|
||||
|
||||
switch (downloadTracker.State.Value)
|
||||
|
|
|
@ -223,7 +223,7 @@ protected override void LogoArriving(OsuLogo logo, bool resuming)
|
|||
if (!resuming)
|
||||
{
|
||||
beatmap.Value = initialBeatmap;
|
||||
Track = initialBeatmap.Track;
|
||||
Track = beatmap.Value.Track;
|
||||
|
||||
// ensure the track starts at maximum volume
|
||||
musicController.CurrentTrack.FinishTransforms();
|
||||
|
|
|
@ -676,10 +676,6 @@ private CarouselBeatmapSet createCarouselSet(BeatmapSetInfo beatmapSet)
|
|||
if (beatmapSet?.IsManaged == true)
|
||||
beatmapSet = beatmapSet.Detach();
|
||||
|
||||
// todo: probably not required any more.
|
||||
// foreach (var b in beatmapSet.Beatmaps)
|
||||
// b.Metadata ??= beatmapSet.Metadata;
|
||||
|
||||
var set = new CarouselBeatmapSet(beatmapSet)
|
||||
{
|
||||
GetRecommendedBeatmap = beatmaps => GetRecommendedBeatmap?.Invoke(beatmaps)
|
||||
|
|
|
@ -34,7 +34,7 @@ protected RealmArchiveModelManager(Storage storage, RealmContextFactory contextF
|
|||
}
|
||||
|
||||
public void DeleteFile(TModel item, RealmNamedFileUsage file) =>
|
||||
performFileOperation(item, managed => DeleteFile(managed, file, managed.Realm));
|
||||
performFileOperation(item, managed => DeleteFile(managed, managed.Files.First(f => f.Filename == file.Filename), managed.Realm));
|
||||
|
||||
public void ReplaceFile(TModel item, RealmNamedFileUsage file, Stream contents) =>
|
||||
performFileOperation(item, managed => ReplaceFile(file, contents, managed.Realm));
|
||||
|
|
Loading…
Reference in New Issue