Make sure the requests are reflected to UI during synchronization.
This commit is contained in:
@@ -97,10 +97,6 @@ public abstract class WinoSynchronizer<TBaseRequest, TMessageType, TCalendarEven
|
|||||||
PendingSynchronizationRequest.Add(options, newCancellationTokenSource);
|
PendingSynchronizationRequest.Add(options, newCancellationTokenSource);
|
||||||
activeSynchronizationCancellationToken = newCancellationTokenSource.Token;
|
activeSynchronizationCancellationToken = newCancellationTokenSource.Token;
|
||||||
|
|
||||||
await synchronizationSemaphore.WaitAsync(activeSynchronizationCancellationToken);
|
|
||||||
|
|
||||||
PublishSynchronizationProgress(1);
|
|
||||||
|
|
||||||
// ImapSynchronizer will send this type when an Idle client receives a notification of changes.
|
// ImapSynchronizer will send this type when an Idle client receives a notification of changes.
|
||||||
// We should not execute requests in this case.
|
// We should not execute requests in this case.
|
||||||
bool shouldExecuteRequests = options.Type != MailSynchronizationType.IMAPIdle;
|
bool shouldExecuteRequests = options.Type != MailSynchronizationType.IMAPIdle;
|
||||||
@@ -207,6 +203,10 @@ public abstract class WinoSynchronizer<TBaseRequest, TMessageType, TCalendarEven
|
|||||||
options.ExcludeMustHaveFolders = requestCopies.All(a => a is ICustomFolderSynchronizationRequest request && request.ExcludeMustHaveFolders);
|
options.ExcludeMustHaveFolders = requestCopies.All(a => a is ICustomFolderSynchronizationRequest request && request.ExcludeMustHaveFolders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await synchronizationSemaphore.WaitAsync(activeSynchronizationCancellationToken);
|
||||||
|
|
||||||
|
PublishSynchronizationProgress(1);
|
||||||
|
|
||||||
State = AccountSynchronizerState.Synchronizing;
|
State = AccountSynchronizerState.Synchronizing;
|
||||||
|
|
||||||
// Handle special synchronization types.
|
// Handle special synchronization types.
|
||||||
|
|||||||
Reference in New Issue
Block a user