Remove old theme service completely.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
using Microsoft.UI.Xaml;
|
||||
using Windows.ApplicationModel.AppService;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.WinUI.Services;
|
||||
using Wino.Core.ViewModels;
|
||||
using Wino.Core.WinUI.Services;
|
||||
using Wino.Services;
|
||||
|
||||
namespace Wino.Core.WinUI;
|
||||
@@ -22,7 +22,6 @@ public static class CoreUWPContainerSetup
|
||||
services.AddSingleton<INativeAppService, NativeAppService>();
|
||||
services.AddSingleton<IStoreManagementService, StoreManagementService>();
|
||||
services.AddSingleton<IPreferencesService, PreferencesService>();
|
||||
services.AddSingleton<IThemeService, ThemeService>();
|
||||
services.AddSingleton<INewThemeService, NewThemeService>();
|
||||
services.AddSingleton<IStatePersistanceService, StatePersistenceService>();
|
||||
services.AddSingleton<IThumbnailService, ThumbnailService>();
|
||||
|
||||
@@ -13,13 +13,13 @@ public sealed partial class CustomThemeBuilderDialog : ContentDialog
|
||||
public byte[] WallpaperData { get; private set; }
|
||||
public string AccentColor { get; private set; }
|
||||
|
||||
private IThemeService _themeService;
|
||||
private INewThemeService _themeService;
|
||||
|
||||
public CustomThemeBuilderDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_themeService = WinoApplication.Current.Services.GetService<IThemeService>();
|
||||
_themeService = WinoApplication.Current.Services.GetService<INewThemeService>();
|
||||
}
|
||||
|
||||
private async void ApplyClicked(ContentDialog sender, ContentDialogButtonClickEventArgs args)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Windows.System;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Windows.System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
@@ -67,7 +67,7 @@ public sealed partial class NewAccountDialog : ContentDialog
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var themeService = WinoApplication.Current.ThemeService.GetAvailableAccountColors();
|
||||
var themeService = WinoApplication.Current.NewThemeService.GetAvailableAccountColors();
|
||||
AvailableColors = themeService.Select(a => new AppColorViewModel(a)).ToList();
|
||||
|
||||
UpdateSelectedColor();
|
||||
|
||||
@@ -20,7 +20,7 @@ public class CustomAppTheme : AppThemeBase
|
||||
public override AppThemeType AppThemeType => AppThemeType.Custom;
|
||||
|
||||
public override string GetBackgroundPreviewImagePath()
|
||||
=> $"ms-appdata:///local/{ThemeService.CustomThemeFolderName}/{Id}_preview.jpg";
|
||||
=> $"ms-appdata:///local/{NewThemeService.CustomThemeFolderName}/{Id}_preview.jpg";
|
||||
|
||||
public override async Task<string> GetThemeResourceDictionaryContentAsync()
|
||||
{
|
||||
|
||||
@@ -3,12 +3,12 @@ using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.Messaging;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Serilog;
|
||||
using Windows.Storage;
|
||||
using Windows.Storage.AccessCache;
|
||||
using Windows.Storage.Pickers;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Wino.Core.Domain;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
@@ -25,12 +25,12 @@ public class DialogServiceBase : IDialogServiceBase
|
||||
{
|
||||
private SemaphoreSlim _presentationSemaphore = new SemaphoreSlim(1);
|
||||
|
||||
protected IThemeService ThemeService { get; }
|
||||
protected INewThemeService ThemeService { get; }
|
||||
protected IConfigurationService ConfigurationService { get; }
|
||||
|
||||
protected IApplicationResourceManager<ResourceDictionary> ApplicationResourceManager { get; }
|
||||
|
||||
public DialogServiceBase(IThemeService themeService, IConfigurationService configurationService, IApplicationResourceManager<ResourceDictionary> applicationResourceManager)
|
||||
public DialogServiceBase(INewThemeService themeService, IConfigurationService configurationService, IApplicationResourceManager<ResourceDictionary> applicationResourceManager)
|
||||
{
|
||||
ThemeService = themeService;
|
||||
ConfigurationService = configurationService;
|
||||
|
||||
@@ -33,7 +33,6 @@ public abstract class WinoApplication : Application, IRecipient<LanguageChanged>
|
||||
protected IWinoLogger LogInitializer { get; }
|
||||
protected IApplicationConfiguration AppConfiguration { get; }
|
||||
protected IWinoServerConnectionManager<AppServiceConnection> AppServiceConnectionManager { get; }
|
||||
public IThemeService ThemeService { get; }
|
||||
public INewThemeService NewThemeService { get; }
|
||||
public IUnderlyingThemeService UnderlyingThemeService { get; }
|
||||
public IThumbnailService ThumbnailService { get; }
|
||||
@@ -56,7 +55,6 @@ public abstract class WinoApplication : Application, IRecipient<LanguageChanged>
|
||||
AppConfiguration = Services.GetService<IApplicationConfiguration>();
|
||||
|
||||
AppServiceConnectionManager = Services.GetService<IWinoServerConnectionManager<AppServiceConnection>>();
|
||||
ThemeService = Services.GetService<IThemeService>();
|
||||
NewThemeService = Services.GetService<INewThemeService>();
|
||||
DatabaseService = Services.GetService<IDatabaseService>();
|
||||
TranslationService = Services.GetService<ITranslationService>();
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Wino.Mail.ViewModels;
|
||||
public partial class EditAccountDetailsPageViewModel : MailBaseViewModel
|
||||
{
|
||||
private readonly IAccountService _accountService;
|
||||
private readonly IThemeService _themeService;
|
||||
private readonly INewThemeService _themeService;
|
||||
private readonly IImapTestService _imapTestService;
|
||||
private readonly IMailDialogService _mailDialogService;
|
||||
|
||||
@@ -76,7 +76,7 @@ public partial class EditAccountDetailsPageViewModel : MailBaseViewModel
|
||||
public bool IsImapServer => ServerInformation != null;
|
||||
|
||||
public EditAccountDetailsPageViewModel(IAccountService accountService,
|
||||
IThemeService themeService,
|
||||
INewThemeService themeService,
|
||||
IImapTestService imapTestService,
|
||||
IMailDialogService mailDialogService)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ public partial class MailListPageViewModel : MailBaseViewModel,
|
||||
public INavigationService NavigationService { get; }
|
||||
public IStatePersistanceService StatePersistenceService { get; }
|
||||
public IPreferencesService PreferencesService { get; }
|
||||
public IThemeService ThemeService { get; }
|
||||
public INewThemeService ThemeService { get; }
|
||||
|
||||
private readonly IAccountService _accountService;
|
||||
private readonly IMailDialogService _mailDialogService;
|
||||
@@ -160,7 +160,7 @@ public partial class MailListPageViewModel : MailBaseViewModel,
|
||||
IWinoRequestDelegator winoRequestDelegator,
|
||||
IKeyPressService keyPressService,
|
||||
IPreferencesService preferencesService,
|
||||
IThemeService themeService,
|
||||
INewThemeService themeService,
|
||||
IWinoLogger winoLogger,
|
||||
IWinoServerConnectionManager winoServerConnectionManager)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Wino.Services;
|
||||
|
||||
public class DialogService : DialogServiceBase, IMailDialogService
|
||||
{
|
||||
public DialogService(IThemeService themeService,
|
||||
public DialogService(INewThemeService themeService,
|
||||
IConfigurationService configurationService,
|
||||
IApplicationResourceManager<ResourceDictionary> applicationResourceManager) : base(themeService, configurationService, applicationResourceManager)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user