mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Fixed progress bar optimizations (before did nothing)
This commit is contained in:
@@ -199,7 +199,7 @@ impl FileTransferActivity {
|
||||
// Increase progress
|
||||
self.set_progress(total_bytes_written, file_size);
|
||||
// Draw only if a significant progress has been made (performance improvement)
|
||||
if last_progress_val + 0.5 >= self.transfer_progress {
|
||||
if last_progress_val < self.transfer_progress - 1.0 {
|
||||
// Draw
|
||||
self.draw();
|
||||
last_progress_val = self.transfer_progress;
|
||||
@@ -443,7 +443,7 @@ impl FileTransferActivity {
|
||||
// Set progress
|
||||
self.set_progress(total_bytes_written, file.size);
|
||||
// Draw only if a significant progress has been made (performance improvement)
|
||||
if last_progress_val + 0.5 >= self.transfer_progress {
|
||||
if last_progress_val < self.transfer_progress - 1.0 {
|
||||
// Draw
|
||||
self.draw();
|
||||
last_progress_val = self.transfer_progress;
|
||||
|
||||
Reference in New Issue
Block a user