Enable default accounts synchronization and timer sync for debug builds but not if it is attached.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -241,9 +242,11 @@ public partial class AppShellViewModel : MailBaseViewModel,
|
|||||||
await RecreateMenuItemsAsync();
|
await RecreateMenuItemsAsync();
|
||||||
await ProcessLaunchOptionsAsync();
|
await ProcessLaunchOptionsAsync();
|
||||||
|
|
||||||
#if !DEBUG
|
if (!Debugger.IsAttached)
|
||||||
await ForceAllAccountSynchronizationsAsync();
|
{
|
||||||
#endif
|
await ForceAllAccountSynchronizationsAsync();
|
||||||
|
}
|
||||||
|
|
||||||
await MakeSureEnableStartupLaunchAsync();
|
await MakeSureEnableStartupLaunchAsync();
|
||||||
await ConfigureBackgroundTasksAsync();
|
await ConfigureBackgroundTasksAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,8 @@ public class ServerContext :
|
|||||||
|
|
||||||
private async void SynchronizationTimerTriggered(object sender, System.Timers.ElapsedEventArgs e)
|
private async void SynchronizationTimerTriggered(object sender, System.Timers.ElapsedEventArgs e)
|
||||||
{
|
{
|
||||||
#if !DEBUG
|
if (Debugger.IsAttached) return;
|
||||||
|
|
||||||
// Send sync request for all accounts.
|
// Send sync request for all accounts.
|
||||||
|
|
||||||
var accounts = await _accountService.GetAccountsAsync();
|
var accounts = await _accountService.GetAccountsAsync();
|
||||||
@@ -103,7 +104,6 @@ public class ServerContext :
|
|||||||
|
|
||||||
await ExecuteServerMessageSafeAsync(null, request);
|
await ExecuteServerMessageSafeAsync(null, request);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Message Handlers
|
#region Message Handlers
|
||||||
|
|||||||
Reference in New Issue
Block a user