Clean code

This commit is contained in:
FongMi 2023-10-17 17:42:05 +08:00
parent 7ec4a6bed6
commit c800627003
3 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@ import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import okhttp3.Response;
@ -78,7 +79,7 @@ public class Market extends Spider {
totalBytes += readBytes;
os.write(buffer, 0, readBytes);
int progress = (int) (totalBytes / length * 100.0);
if (progress % 10 < 5) Utils.notify("正在下載..." + progress + "%");
if (progress % 10 <= new Random().nextInt(6)) Utils.notify("正在下載..." + progress + "%");
}
}
}

Binary file not shown.

View File

@ -1 +1 @@
e387f38428b7c337475b2827c56949f5
6d1c97eeff8c95ad0f456d066efde69b