mirror of
https://github.com/developersu/ns-usbloader.git
synced 2025-05-13 06:34:43 -04:00
Update scan-folder-to-add-files function: set pop-up window with indicator showing how many files did we scan and how many files would be added.
Minor color corrections on light theme for whoever use it Fix TF progress-bar (can't recall when I broke it..)
This commit is contained in:
parent
619a2b157e
commit
d8ea426fa4
11 changed files with 247 additions and 32 deletions
|
@ -222,7 +222,6 @@ class TinFoil extends TransferModule {
|
|||
if ((currentOffset + chunk) >= size )
|
||||
chunk = Math.toIntExact(size - currentOffset);
|
||||
//System.out.println("CO: "+currentOffset+"\t\tEO: "+size+"\t\tRP: "+chunk); // NOTE: DEBUG
|
||||
logPrinter.updateProgress((currentOffset + chunk) / (size / 100.0) / 100.0);
|
||||
|
||||
readBuffer = new byte[chunk]; // TODO: not perfect moment, consider refactoring.
|
||||
|
||||
|
@ -232,6 +231,7 @@ class TinFoil extends TransferModule {
|
|||
if (writeUsb(readBuffer))
|
||||
throw new IOException("TF Failure during file transfer.");
|
||||
currentOffset += chunk;
|
||||
logPrinter.updateProgress((double)currentOffset / (double)size);
|
||||
}
|
||||
nsSplitReader.close();
|
||||
logPrinter.updateProgress(1.0);
|
||||
|
@ -251,7 +251,6 @@ class TinFoil extends TransferModule {
|
|||
if ((currentOffset + chunk) >= size)
|
||||
chunk = Math.toIntExact(size - currentOffset);
|
||||
//System.out.println("CO: "+currentOffset+"\t\tEO: "+receivedRangeSize+"\t\tRP: "+chunk); // NOTE: DEBUG
|
||||
logPrinter.updateProgress((currentOffset + chunk) / (size / 100.0) / 100.0);
|
||||
|
||||
readBuffer = new byte[chunk];
|
||||
|
||||
|
@ -261,6 +260,7 @@ class TinFoil extends TransferModule {
|
|||
if (writeUsb(readBuffer))
|
||||
throw new IOException("TF Failure during file transfer.");
|
||||
currentOffset += chunk;
|
||||
logPrinter.updateProgress((double)currentOffset / (double)size);
|
||||
}
|
||||
bufferedInStream.close();
|
||||
logPrinter.updateProgress(1.0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue