2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00

Make percentage be updated every 1% again, it seems to work.

This commit is contained in:
Albert Vaca
2017-08-01 22:22:25 +02:00
parent 7a097f7b27
commit 407ce1ccb0

View File

@@ -234,10 +234,10 @@ public class SharePlugin extends Plugin {
destinationOutput.write(data, 0, count); destinationOutput.write(data, 0, count);
if (fileLength > 0) { if (fileLength > 0) {
if (progress >= fileLength) break; if (progress >= fileLength) break;
long progressPercentage = (progress * 10 / fileLength); long progressPercentage = (progress * 100 / fileLength);
if (progressPercentage != prevProgressPercentage) { if (progressPercentage != prevProgressPercentage) {
prevProgressPercentage = progressPercentage; prevProgressPercentage = progressPercentage;
notification.setProgress((int) progressPercentage * 10); notification.setProgress((int) progressPercentage);
notification.show(); notification.show();
} }
} }