Skip to content

Commit 5832515

Browse files
l3utterflyplrthink
authored andcommitted
updated logic to handle extraction progress
1 parent 1989532 commit 5832515

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android/src/main/java/com/rnziparchive/RNZipArchiveModule.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@ public void run() {
258258

259259
extractedBytes += entry.getCompressedSize();
260260

261+
// do not let the percentage go over 99% because we want it to hit 100% only when we are sure it's finished
262+
if(extractedBytes > compressedSize*0.99) extractedBytes = (long) (compressedSize*0.99);
263+
261264
updateProgress(extractedBytes, compressedSize, entry.getName());
262265
}
263266

0 commit comments

Comments
 (0)