`PostImport` -> `PresentImport`

This commit is contained in:
Dean Herbert 2022-06-20 18:21:37 +09:00
parent ef71886e1b
commit dbae4c6f5a
6 changed files with 12 additions and 12 deletions

View File

@ -454,9 +454,9 @@ public void Dispose()
#region Implementation of IPostImports<out BeatmapSetInfo>
public Action<IEnumerable<Live<BeatmapSetInfo>>>? PostImport
public Action<IEnumerable<Live<BeatmapSetInfo>>>? PresentImport
{
set => beatmapImporter.PostImport = value;
set => beatmapImporter.PresentImport = value;
}
#endregion

View File

@ -12,6 +12,6 @@ public interface IPostImports<TModel>
/// <summary>
/// Fired when the user requests to view the resulting import.
/// </summary>
public Action<IEnumerable<Live<TModel>>>? PostImport { set; }
public Action<IEnumerable<Live<TModel>>>? PresentImport { set; }
}
}

View File

@ -65,7 +65,7 @@ public abstract class RealmArchiveModelImporter<TModel> : IModelImporter<TModel>
/// <summary>
/// Fired when the user requests to view the resulting import.
/// </summary>
public Action<IEnumerable<Live<TModel>>>? PostImport { get; set; }
public Action<IEnumerable<Live<TModel>>>? PresentImport { get; set; }
/// <summary>
/// Set an endpoint for notifications to be posted to.
@ -158,12 +158,12 @@ await Task.WhenAll(tasks.Select(async task =>
? $"Imported {imported.First().GetDisplayString()}!"
: $"Imported {imported.Count} {HumanisedModelName}s!";
if (imported.Count > 0 && PostImport != null)
if (imported.Count > 0 && PresentImport != null)
{
notification.CompletionText += " Click to view.";
notification.CompletionClickAction = () =>
{
PostImport?.Invoke(imported);
PresentImport?.Invoke(imported);
return true;
};
}

View File

@ -711,13 +711,13 @@ protected override void LoadComplete()
SkinManager.PostNotification = n => Notifications.Post(n);
BeatmapManager.PostNotification = n => Notifications.Post(n);
BeatmapManager.PostImport = items => PresentBeatmap(items.First().Value);
BeatmapManager.PresentImport = items => PresentBeatmap(items.First().Value);
BeatmapDownloader.PostNotification = n => Notifications.Post(n);
ScoreDownloader.PostNotification = n => Notifications.Post(n);
ScoreManager.PostNotification = n => Notifications.Post(n);
ScoreManager.PostImport = items => PresentScore(items.First().Value);
ScoreManager.PresentImport = items => PresentScore(items.First().Value);
// 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.

View File

@ -269,9 +269,9 @@ public Live<ScoreInfo> Import(ScoreInfo item, ArchiveReader archive = null, bool
#region Implementation of IPresentImports<ScoreInfo>
public Action<IEnumerable<Live<ScoreInfo>>> PostImport
public Action<IEnumerable<Live<ScoreInfo>>> PresentImport
{
set => scoreImporter.PostImport = value;
set => scoreImporter.PresentImport = value;
}
#endregion

View File

@ -259,9 +259,9 @@ private T lookupWithFallback<T>(Func<ISkin, T> lookupFunction)
#region Implementation of IModelImporter<SkinInfo>
public Action<IEnumerable<Live<SkinInfo>>> PostImport
public Action<IEnumerable<Live<SkinInfo>>> PresentImport
{
set => skinImporter.PostImport = value;
set => skinImporter.PresentImport = value;
}
public Task Import(params string[] paths) => skinImporter.Import(paths);