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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user