Remove unnecessary manager parameter

Confused why I added this in the first place..
This commit is contained in:
Dean Herbert 2021-11-25 18:36:01 +09:00
parent cc1b91e4bd
commit e2ebcf7a26
7 changed files with 10 additions and 14 deletions

View File

@ -10,8 +10,8 @@ namespace osu.Game.Database
{
protected override string FileExtension => ".osz";
public LegacyBeatmapExporter(Storage storage, IModelManager<BeatmapSetInfo> manager)
: base(storage, manager)
public LegacyBeatmapExporter(Storage storage)
: base(storage)
{
}
}

View File

@ -19,16 +19,12 @@ namespace osu.Game.Database
/// </summary>
protected abstract string FileExtension { get; }
protected readonly IModelManager<TModel> Manager;
protected readonly Storage UserFileStorage;
private readonly Storage exportStorage;
protected LegacyExporter(Storage storage, IModelManager<TModel> manager)
protected LegacyExporter(Storage storage)
{
Manager = manager;
exportStorage = storage.GetStorageForDirectory(@"exports");
UserFileStorage = storage.GetStorageForDirectory(@"files");
}

View File

@ -13,8 +13,8 @@ namespace osu.Game.Database
{
protected override string FileExtension => ".osr";
public LegacyScoreExporter(Storage storage, IModelManager<ScoreInfo> manager)
: base(storage, manager)
public LegacyScoreExporter(Storage storage)
: base(storage)
{
}

View File

@ -10,8 +10,8 @@ namespace osu.Game.Database
{
protected override string FileExtension => ".osk";
public LegacySkinExporter(Storage storage, IModelManager<SkinInfo> manager)
: base(storage, manager)
public LegacySkinExporter(Storage storage)
: base(storage)
{
}
}

View File

@ -400,7 +400,7 @@ namespace osu.Game.Online.Leaderboards
items.Add(new OsuMenuItem("Use these mods", MenuItemType.Highlighted, () => songSelect.Mods.Value = Score.Mods));
if (Score.Files.Count > 0)
items.Add(new OsuMenuItem("Export", MenuItemType.Standard, () => new LegacyScoreExporter(storage, scoreManager).Export(Score)));
items.Add(new OsuMenuItem("Export", MenuItemType.Standard, () => new LegacyScoreExporter(storage).Export(Score)));
if (Score.ID != 0)
items.Add(new OsuMenuItem("Delete", MenuItemType.Destructive, () => dialogOverlay?.Push(new LocalScoreDeleteDialog(Score))));

View File

@ -188,7 +188,7 @@ namespace osu.Game.Overlays.Settings.Sections
{
try
{
new LegacySkinExporter(storage, skins).Export(currentSkin.Value.SkinInfo);
new LegacySkinExporter(storage).Export(currentSkin.Value.SkinInfo);
}
catch (Exception e)
{

View File

@ -758,7 +758,7 @@ namespace osu.Game.Screens.Edit
private void exportBeatmap()
{
Save();
new LegacyBeatmapExporter(storage, beatmapManager).Export(Beatmap.Value.BeatmapSetInfo);
new LegacyBeatmapExporter(storage).Export(Beatmap.Value.BeatmapSetInfo);
}
private void updateLastSavedHash()