gui, lib/model: Add new state FolderPreparingSync (fixes #6027) (#6028)

This commit is contained in:
Simon Frei
2019-10-16 09:08:54 +02:00
committed by Jakob Borg
parent 031684116b
commit 7b33294955
4 changed files with 39 additions and 23 deletions
+6 -1
View File
@@ -176,7 +176,6 @@ func (f *sendReceiveFolder) pull() bool {
l.Debugf("%v pulling", f)
f.setState(FolderSyncing)
f.clearPullErrors()
scanChan := make(chan string)
@@ -194,6 +193,10 @@ func (f *sendReceiveFolder) pull() bool {
default:
}
// Needs to be set on every loop, as the puller might have set
// it to FolderSyncing during the last iteration.
f.setState(FolderSyncPreparing)
changed := f.pullerIteration(scanChan)
l.Debugln(f, "changed", changed, "on try", tries+1)
@@ -1396,6 +1399,8 @@ func (f *sendReceiveFolder) pullerRoutine(in <-chan pullBlockState, out chan<- *
continue
}
f.setState(FolderSyncing) // Does nothing if already FolderSyncing
// The requestLimiter limits how many pending block requests we have
// ongoing at any given time, based on the size of the blocks
// themselves.