mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 05:06:51 +00:00
fix(GODT-2490): fix sync progress not being reset when toggling split mode.
This commit is contained in:
@ -309,6 +309,8 @@ void User::setIsSyncing(bool syncing) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
isSyncing_ = syncing;
|
isSyncing_ = syncing;
|
||||||
|
syncProgress_ = 0;
|
||||||
|
|
||||||
emit isSyncingChanged(syncing);
|
emit isSyncingChanged(syncing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -340,6 +340,11 @@ func (s *Service) watchEvents() {
|
|||||||
case events.SyncFinished:
|
case events.SyncFinished:
|
||||||
_ = s.SendEvent(NewSyncFinishedEvent(event.UserID))
|
_ = s.SendEvent(NewSyncFinishedEvent(event.UserID))
|
||||||
|
|
||||||
|
case events.SyncFailed:
|
||||||
|
if errors.Is(event.Error, context.Canceled) {
|
||||||
|
_ = s.SendEvent(NewSyncFinishedEvent(event.UserID))
|
||||||
|
}
|
||||||
|
|
||||||
case events.SyncProgress:
|
case events.SyncProgress:
|
||||||
_ = s.SendEvent(NewSyncProgressEvent(event.UserID, event.Progress, event.Elapsed.Milliseconds(), event.Remaining.Milliseconds()))
|
_ = s.SendEvent(NewSyncProgressEvent(event.UserID, event.Progress, event.Elapsed.Milliseconds(), event.Remaining.Milliseconds()))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user