Percentage available on progress count struct

This commit is contained in:
Michal Horejsek
2020-11-04 13:57:23 +01:00
parent 5b7eabe21a
commit a40018cdf9
2 changed files with 8 additions and 1 deletions

View File

@ -344,7 +344,7 @@ func (f *FrontendQt) setProgressManager(progress *transfer.Progress) {
f.Qml.SetProgressFails(int(counts.Failed))
f.Qml.SetProgressDescription(progress.PauseReason())
if counts.Total > 0 {
newProgress := float32(counts.Imported+counts.Skipped+counts.Failed) / float32(counts.Total)
newProgress := counts.Progress()
if newProgress >= 0 && newProgress != f.Qml.Progress() {
f.Qml.SetProgress(newProgress)
f.Qml.ProgressChanged(newProgress)