Fix incorrect ETA calculation for active file

This commit is contained in:
Kovid Goyal 2023-08-08 17:45:28 +05:30
parent 1c251e5a53
commit a628609ca8
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -590,7 +590,7 @@ func (self *SendHandler) draw_progress_for_current_file(af *File, spinner_char s
self.render_progress(af.display_name, Progress{
spinner_char: spinner_char, is_complete: is_complete,
bytes_so_far: af.reported_progress, total_bytes: af.bytes_to_transmit,
secs_so_far: secs_so_far.Seconds(), bytes_per_sec: safe_divide(p.transfered_stats_amt, p.transfered_stats_interval),
secs_so_far: secs_so_far.Seconds(), bytes_per_sec: safe_divide(p.transfered_stats_amt, p.transfered_stats_interval.Abs().Seconds()),
})
}