From d8838ddbfbda709e1b92e10e6914d8f492a23623 Mon Sep 17 00:00:00 2001 From: Lucas A Date: Tue, 8 Dec 2020 18:48:50 +0100 Subject: [PATCH] Remove duplicated overload. --- osu.Game/Database/ArchiveModelManager.cs | 43 +----------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/osu.Game/Database/ArchiveModelManager.cs b/osu.Game/Database/ArchiveModelManager.cs index 3ec3b96579..6766ca2b77 100644 --- a/osu.Game/Database/ArchiveModelManager.cs +++ b/osu.Game/Database/ArchiveModelManager.cs @@ -218,48 +218,7 @@ namespace osu.Game.Database } return import; - } - - /// - /// Import one from a . - /// - /// The stream to import files from. - /// The filename of the archive being imported. - public async Task Import(Stream stream, string filename) - { - var notification = new ProgressNotification - { - Progress = 0, - State = ProgressNotificationState.Active, - Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import is initialising...", - }; - - PostNotification.Invoke(notification); - - try - { - // we need to keep around the filename as some model managers (namely SkinManager) use the archive name to populate skin info - var imported = await Import(new ZipArchiveReader(stream, filename), notification.CancellationToken); - - notification.CompletionText = $"Imported {imported}! Click to view."; - notification.CompletionClickAction += () => - { - PresentImport?.Invoke(new[] { imported }); - return true; - }; - notification.State = ProgressNotificationState.Completed; - } - catch (TaskCanceledException) - { - throw; - } - catch (Exception e) - { - notification.Text = $"{HumanisedModelName.Humanize(LetterCasing.Title)} import failed!"; - notification.State = ProgressNotificationState.Cancelled; - Logger.Error(e, $@"Could not import ({filename})", LoggingTarget.Database); - } - } + } /// /// Fired when the user requests to view the resulting import.