From e13090066c27315f91bad2800d570a5c80b9cfab Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Tue, 30 May 2017 23:48:58 +0200 Subject: [PATCH] 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). --- src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java b/src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java index 6ea79fd1..62195aa6 100644 --- a/src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java +++ b/src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java @@ -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()); } }