Delegating changes to UI and triggering new background synchronization.

This commit is contained in:
Burak Kaan Köse
2024-07-18 20:03:58 +02:00
parent 7ef045a0ad
commit 38f44a8b39
25 changed files with 331 additions and 104 deletions

View File

@@ -12,7 +12,7 @@ namespace Wino.Mail.ViewModels
{
private readonly IStoreRatingService _storeRatingService;
private readonly INativeAppService _nativeAppService;
private readonly IAppInitializerService _appInitializerService;
private readonly IApplicationConfiguration _appInitializerService;
private readonly IFileService _fileService;
private readonly ILogInitializer _logInitializer;
@@ -31,7 +31,7 @@ namespace Wino.Mail.ViewModels
IDialogService dialogService,
INativeAppService nativeAppService,
IPreferencesService preferencesService,
IAppInitializerService appInitializerService,
IApplicationConfiguration appInitializerService,
IFileService fileService,
ILogInitializer logInitializer) : base(dialogService)
{
@@ -77,7 +77,7 @@ namespace Wino.Mail.ViewModels
private async Task SaveLogInternalAsync(string sourceFileName)
{
var appDataFolder = _appInitializerService.GetApplicationDataFolder();
var appDataFolder = _appInitializerService.ApplicationDataFolderPath;
var logFile = Path.Combine(appDataFolder, sourceFileName);

View File

@@ -4,6 +4,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.AppCenter.Crashes;
using MoreLinq;
@@ -129,6 +130,9 @@ namespace Wino.Mail.ViewModels
_winoRequestDelegator = winoRequestDelegator;
}
[RelayCommand]
private Task ReconnectServerAsync() => ServerConnectionManager.ConnectAsync();
protected override void OnDispatcherAssigned()
{
base.OnDispatcherAssigned();