Skip to content

Commit

Permalink
Remove Device Restore (#3953)
Browse files Browse the repository at this point in the history
* Remove RestoreState.cs

* Remove WinGetPackageRestoreDataSource and WinGetPackageRestoreDataSourceTest

* Remove using from BaseSetupFlowTest.cs

* Remove using from ServiceExtension

* Remove using from PackageViewModel
:

* Remove strings

* Updates (in progress)

* Update GetIconByTheme

* Split IconByTheme into GetLight/DarkThemeIcon()

* Refactor GetLight/DarkThemeIcon()

* Check _package.Icon, not packageIcon

* Remove unnecessary usings from PackageViewModel.cs

* Refactor GetIconByTheme()
  • Loading branch information
lauren-ciha authored Oct 25, 2024
1 parent be38a85 commit cbca79d
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 471 deletions.
21 changes: 0 additions & 21 deletions tools/DevDiagnostics/DevHome.DevDiagnostics/Models/RestoreState.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using DevHome.SetupFlow.ViewModels;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Internal.Windows.DevHome.Helpers.Restore;
using Moq;

namespace DevHome.SetupFlow.UnitTest;
Expand All @@ -26,8 +25,6 @@ public class BaseSetupFlowTest

protected Mock<IThemeSelectorService> ThemeSelectorService { get; private set; }

protected Mock<IRestoreInfo> RestoreInfo { get; private set; }

protected Mock<ISetupFlowStringResource> StringResource { get; private set; }

protected Mock<ILocalSettingsService> LocalSettingsService { get; private set; }
Expand All @@ -40,7 +37,6 @@ public void TestInitialize()
{
WindowsPackageManager = new Mock<IWinGet>();
ThemeSelectorService = new Mock<IThemeSelectorService>();
RestoreInfo = new Mock<IRestoreInfo>();
StringResource = new Mock<ISetupFlowStringResource>();
LocalSettingsService = new Mock<ILocalSettingsService>();
TestHost = CreateTestHost();
Expand Down Expand Up @@ -76,11 +72,8 @@ private IHost CreateTestHost()
// App-management services
services.AddSingleton<IWinGet>(WindowsPackageManager.Object);
services.AddTransient<WinGetPackageJsonDataSource>();
services.AddTransient<WinGetPackageRestoreDataSource>();
services.AddSingleton<IRestoreInfo>(RestoreInfo.Object);
services.AddSingleton<PackageProvider>();
services.AddSingleton<IAppManagementInitializer, AppManagementInitializer>();
services.AddSingleton<WinGetPackageDataSource, WinGetPackageRestoreDataSource>();
services.AddSingleton<ICatalogDataSourceLoader, CatalogDataSourceLoader>();
services.AddSingleton<IScreenReaderService>(new Mock<IScreenReaderService>().Object);
services.AddSingleton<IDSC>(new Mock<IDSC>().Object);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.Internal.Windows.DevHome.Helpers;
using Microsoft.Internal.Windows.DevHome.Helpers.Restore;

namespace DevHome.SetupFlow.Extensions;

Expand Down Expand Up @@ -58,13 +57,11 @@ private static IServiceCollection AddAppManagement(this IServiceCollection servi
services.AddTransient<SearchMessageViewModel>();

// Services
services.AddSingleton<IRestoreInfo, RestoreInfo>();
services.AddSingleton<PackageProvider>();
services.AddTransient<AppManagementTaskGroup>();
services.AddSingleton<ICatalogDataSourceLoader, CatalogDataSourceLoader>();
services.AddSingleton<IAppManagementInitializer, AppManagementInitializer>();

services.AddSingleton<WinGetPackageDataSource, WinGetPackageRestoreDataSource>();
services.AddSingleton<WinGetPackageDataSource, WinGetPackageJsonDataSource>(sp =>
{
var dataSourcePath = sp.GetService<IOptions<SetupFlowOptions>>().Value.WinGetPackageJsonDataSourcePath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,6 @@ public static class StringResourceKey
public static readonly string RemovedAllApplications = nameof(RemovedAllApplications);
public static readonly string ResultCountPlural = nameof(ResultCountPlural);
public static readonly string ResultCountSingular = nameof(ResultCountSingular);
public static readonly string RestorePackagesTitle = nameof(RestorePackagesTitle);
public static readonly string RestorePackagesDescription = nameof(RestorePackagesDescription);
public static readonly string RestorePackagesDescriptionWithDate = nameof(RestorePackagesDescriptionWithDate);
public static readonly string Repository = nameof(Repository);
public static readonly string ReviewNothingToSetUpToolTip = nameof(ReviewNothingToSetUpToolTip);
public static readonly string SelectedPackagesCount = nameof(SelectedPackagesCount);
Expand Down
Loading

0 comments on commit cbca79d

Please sign in to comment.