From 58b70000ae546ef79e40ce04a00c2d6590081b3c Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Mon, 2 Jun 2014 14:32:33 +0200 Subject: [PATCH] Fixed repeated upload of instant pictures after connectivity recovery --- src/com/owncloud/android/files/services/FileUploader.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/owncloud/android/files/services/FileUploader.java b/src/com/owncloud/android/files/services/FileUploader.java index 731522cf..e9d8d1b8 100644 --- a/src/com/owncloud/android/files/services/FileUploader.java +++ b/src/com/owncloud/android/files/services/FileUploader.java @@ -807,9 +807,13 @@ public class FileUploader extends Service implements OnDatatransferProgressListe resultBuilder.setContentText(content); mNotificationManager.notify(tickerId, resultBuilder.build()); - // Remove success notification - if (uploadResult.isSuccess()) { - // Sleep 2 seconds, so show the notification before remove it + if (uploadResult.isSuccess()) { + + DbHandler db = new DbHandler(this.getBaseContext()); + db.removeIUPendingFile(mCurrentUpload.getOriginalStoragePath()); + db.close(); + + // remove success notification, with a delay of 2 seconds NotificationDelayer.cancelWithDelay( mNotificationManager, R.string.uploader_upload_succeeded_ticker, -- 2.11.0