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

Update the notification less often

Otherwise, for some reason it stops allowing further updates afterwards
and looks like the download never completed (even though it did).
This commit is contained in:
Albert Vaca
2017-05-30 23:48:58 +02:00
parent 07ec3f2132
commit e13090066c

View File

@@ -159,10 +159,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;
builder.setProgress(100, (int) progressPercentage, false);
builder.setProgress(100, (int) progressPercentage*10, false);
NotificationHelper.notifyCompat(notificationManager, notificationId, builder.build());
}
}