Split out BeatmapOnlineLookupQueue from BeatmapManager

This commit is contained in:
Dean Herbert
2021-09-30 14:46:01 +09:00
parent b8b61a196f
commit 6ffd9fdcfa
5 changed files with 234 additions and 234 deletions

View File

@ -138,6 +138,8 @@ namespace osu.Game
private UserLookupCache userCache;
private BeatmapOnlineLookupQueue onlineBeatmapLookupCache;
private FileStore fileStore;
private RulesetConfigCache rulesetConfigCache;
@ -242,7 +244,11 @@ namespace osu.Game
// ordering is important here to ensure foreign keys rules are not broken in ModelStore.Cleanup()
dependencies.Cache(ScoreManager = new ScoreManager(RulesetStore, () => BeatmapManager, Storage, API, contextFactory, Scheduler, Host, () => difficultyCache, LocalConfig));
dependencies.Cache(BeatmapManager = new BeatmapManager(Storage, contextFactory, RulesetStore, API, Audio, Resources, Host, defaultBeatmap, true));
dependencies.Cache(BeatmapManager = new BeatmapManager(Storage, contextFactory, RulesetStore, API, Audio, Resources, Host, defaultBeatmap));
onlineBeatmapLookupCache = new BeatmapOnlineLookupQueue(API, Storage);
BeatmapManager.PopulateOnlineInformation = onlineBeatmapLookupCache.UpdateAsync;
// this should likely be moved to ArchiveModelManager when another case appears where it is necessary
// to have inter-dependent model managers. this could be obtained with an IHasForeign<T> interface to
@ -524,7 +530,6 @@ namespace osu.Game
base.Dispose(isDisposing);
RulesetStore?.Dispose();
BeatmapManager?.Dispose();
LocalConfig?.Dispose();
contextFactory?.FlushConnections();