Browse Source

fix(model): properly set folder state "syncing" when copying data (#10227)

Prior to this fix, the folder would only get marked as "syncing" once we
started downloading data from the network. However in some cases there
will be a lot of data that can be reused locally and we spend
significant time copying blocks before downloading anything; in that
case, the folder would appear as "preparing to sync" while it was in
fact moving lots of data.

This fixes that, making it "syncing" as soon as it begins either copying
or downloading data.
Jakob Borg 5 months ago
parent
commit
e3424ad503
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/model/folder_sendrecv.go

+ 2 - 0
lib/model/folder_sendrecv.go

@@ -1309,6 +1309,8 @@ func (f *sendReceiveFolder) copierRoutine(in <-chan copyBlocksState, pullChan ch
 			f.model.progressEmitter.Register(state.sharedPullerState)
 		}
 
+		f.setState(FolderSyncing) // Does nothing if already FolderSyncing
+
 	blocks:
 		for _, block := range state.blocks {
 			select {