fix(GODT-2490): fix sync progress not being reset when toggling split mode.

This commit is contained in:
Xavier Michelon 2023-10-05 11:33:09 +02:00
parent acc7ca8d4a
commit cdbcd30d15
2 changed files with 7 additions and 0 deletions

View File

@ -309,6 +309,8 @@ void User::setIsSyncing(bool syncing) {
}
isSyncing_ = syncing;
syncProgress_ = 0;
emit isSyncingChanged(syncing);
}

View File

@ -340,6 +340,11 @@ func (s *Service) watchEvents() {
case events.SyncFinished:
_ = s.SendEvent(NewSyncFinishedEvent(event.UserID))
case events.SyncFailed:
if errors.Is(event.Error, context.Canceled) {
_ = s.SendEvent(NewSyncFinishedEvent(event.UserID))
}
case events.SyncProgress:
_ = s.SendEvent(NewSyncProgressEvent(event.UserID, event.Progress, event.Elapsed.Milliseconds(), event.Remaining.Milliseconds()))