mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 20:42:55 +08:00
Rename out of place interface name
This commit is contained in:
parent
e631653f4b
commit
63f0b0c932
@ -178,7 +178,7 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fired when the user requests to view the resulting import.
|
/// Fired when the user requests to view the resulting import.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Action<IEnumerable<ILive<BeatmapSetInfo>>> PresentImport { set => beatmapModelManager.PresentImport = value; }
|
public Action<IEnumerable<ILive<BeatmapSetInfo>>> PresentImport { set => beatmapModelManager.PostImport = value; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete a beatmap difficulty.
|
/// Delete a beatmap difficulty.
|
||||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Database
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <typeparam name="TModel">The model type.</typeparam>
|
/// <typeparam name="TModel">The model type.</typeparam>
|
||||||
/// <typeparam name="TFileModel">The associated file join type.</typeparam>
|
/// <typeparam name="TFileModel">The associated file join type.</typeparam>
|
||||||
public abstract class ArchiveModelManager<TModel, TFileModel> : ICanAcceptFiles, IModelManager<TModel>, IModelFileManager<TModel, TFileModel>, IPresentImports<TModel>
|
public abstract class ArchiveModelManager<TModel, TFileModel> : ICanAcceptFiles, IModelManager<TModel>, IModelFileManager<TModel, TFileModel>, IPostImports<TModel>
|
||||||
where TModel : class, IHasFiles<TFileModel>, IHasPrimaryKey, ISoftDelete
|
where TModel : class, IHasFiles<TFileModel>, IHasPrimaryKey, ISoftDelete
|
||||||
where TFileModel : class, INamedFileInfo, new()
|
where TFileModel : class, INamedFileInfo, new()
|
||||||
{
|
{
|
||||||
@ -200,12 +200,12 @@ namespace osu.Game.Database
|
|||||||
? $"Imported {imported.First()}!"
|
? $"Imported {imported.First()}!"
|
||||||
: $"Imported {imported.Count} {HumanisedModelName}s!";
|
: $"Imported {imported.Count} {HumanisedModelName}s!";
|
||||||
|
|
||||||
if (imported.Count > 0 && PresentImport != null)
|
if (imported.Count > 0 && PostImport != null)
|
||||||
{
|
{
|
||||||
notification.CompletionText += " Click to view.";
|
notification.CompletionText += " Click to view.";
|
||||||
notification.CompletionClickAction = () =>
|
notification.CompletionClickAction = () =>
|
||||||
{
|
{
|
||||||
PresentImport?.Invoke(imported);
|
PostImport?.Invoke(imported);
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ namespace osu.Game.Database
|
|||||||
return import;
|
return import;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Action<IEnumerable<ILive<TModel>>> PresentImport { protected get; set; }
|
public Action<IEnumerable<ILive<TModel>>> PostImport { protected get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Silently import an item from an <see cref="ArchiveReader"/>.
|
/// Silently import an item from an <see cref="ArchiveReader"/>.
|
||||||
|
@ -6,12 +6,12 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace osu.Game.Database
|
namespace osu.Game.Database
|
||||||
{
|
{
|
||||||
public interface IPresentImports<out TModel>
|
public interface IPostImports<out TModel>
|
||||||
where TModel : class
|
where TModel : class
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fired when the user requests to view the resulting import.
|
/// Fired when the user requests to view the resulting import.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Action<IEnumerable<ILive<TModel>>> PresentImport { set; }
|
public Action<IEnumerable<ILive<TModel>>> PostImport { set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -627,7 +627,7 @@ namespace osu.Game
|
|||||||
BeatmapManager.PresentImport = items => PresentBeatmap(items.First().Value);
|
BeatmapManager.PresentImport = items => PresentBeatmap(items.First().Value);
|
||||||
|
|
||||||
ScoreManager.PostNotification = n => Notifications.Post(n);
|
ScoreManager.PostNotification = n => Notifications.Post(n);
|
||||||
ScoreManager.PresentImport = items => PresentScore(items.First().Value);
|
ScoreManager.PostImport = items => PresentScore(items.First().Value);
|
||||||
|
|
||||||
// make config aware of how to lookup skins for on-screen display purposes.
|
// make config aware of how to lookup skins for on-screen display purposes.
|
||||||
// if this becomes a more common thing, tracked settings should be reconsidered to allow local DI.
|
// if this becomes a more common thing, tracked settings should be reconsidered to allow local DI.
|
||||||
|
@ -25,7 +25,7 @@ using osu.Game.Rulesets.Scoring;
|
|||||||
|
|
||||||
namespace osu.Game.Scoring
|
namespace osu.Game.Scoring
|
||||||
{
|
{
|
||||||
public class ScoreManager : IModelManager<ScoreInfo>, IModelFileManager<ScoreInfo, ScoreFileInfo>, IModelDownloader<ScoreInfo>, ICanAcceptFiles, IPresentImports<ScoreInfo>
|
public class ScoreManager : IModelManager<ScoreInfo>, IModelFileManager<ScoreInfo, ScoreFileInfo>, IModelDownloader<ScoreInfo>, ICanAcceptFiles, IPostImports<ScoreInfo>
|
||||||
{
|
{
|
||||||
private readonly Scheduler scheduler;
|
private readonly Scheduler scheduler;
|
||||||
private readonly Func<BeatmapDifficultyCache> difficulties;
|
private readonly Func<BeatmapDifficultyCache> difficulties;
|
||||||
@ -365,9 +365,9 @@ namespace osu.Game.Scoring
|
|||||||
|
|
||||||
#region Implementation of IPresentImports<ScoreInfo>
|
#region Implementation of IPresentImports<ScoreInfo>
|
||||||
|
|
||||||
public Action<IEnumerable<ILive<ScoreInfo>>> PresentImport
|
public Action<IEnumerable<ILive<ScoreInfo>>> PostImport
|
||||||
{
|
{
|
||||||
set => scoreModelManager.PresentImport = value;
|
set => scoreModelManager.PostImport = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user