2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Noti never changes to finished if we spam too many noti updates

Can reproduce it 100% on my phone, but seems to work fine on others...
This commit is contained in:
Albert Vaca
2017-07-14 03:20:12 +02:00
parent 5d87675586
commit 4e6dc31247

View File

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