fix(GODT-2490): fix sync progress not being reset when toggling split mode.
This commit is contained in:
parent
acc7ca8d4a
commit
cdbcd30d15
|
@ -309,6 +309,8 @@ void User::setIsSyncing(bool syncing) {
|
|||
}
|
||||
|
||||
isSyncing_ = syncing;
|
||||
syncProgress_ = 0;
|
||||
|
||||
emit isSyncingChanged(syncing);
|
||||
}
|
||||
|
||||
|
|
|
@ -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()))
|
||||
|
||||
|
|
Loading…
Reference in New Issue