mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
feat(GODT-2829): Integrate new sync service
Update imap service to use the new sync service. The new sync state is stored as simple file on disk to avoid contention with concurrent vault writes.
This commit is contained in:
@ -136,7 +136,12 @@ func addNewAddressSplitMode(ctx context.Context, s *Service, addrID string) erro
|
||||
|
||||
s.connectors[connector.addrID] = connector
|
||||
|
||||
if err := syncLabels(ctx, s.labels.GetLabelMap(), connector); err != nil {
|
||||
updates, err := syncLabels(ctx, s.labels.GetLabelMap(), []*Connector{connector})
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create labels updates for new address: %w", err)
|
||||
}
|
||||
|
||||
if err := waitOnIMAPUpdates(ctx, updates); err != nil {
|
||||
return fmt.Errorf("failed to sync labels for new address: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user