hopefully really fix dodgy code

Signed-off-by: Jonas Mayer <jonas.a.mayer@gmx.net>
This commit is contained in:
Jonas Mayer 2023-12-07 00:21:15 +01:00 committed by tobiasKaminsky
parent 322565f099
commit 5326d08aeb
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -1447,12 +1447,19 @@ public class FileUploader extends Service
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
}
if (uploadFileOperation == null || uploadFileOperation.getOldFile() == null) return;
//cancel for old file because of file conflicts
mNotificationManager.cancel(NotificationUtils.createUploadNotificationTag(uploadFileOperation.getOldFile()),
NOTIFICATION_ERROR_ID);
if (uploadFileOperation == null) return;
mNotificationManager.cancel(NotificationUtils.createUploadNotificationTag(uploadFileOperation.getFile()),
NOTIFICATION_ERROR_ID);
NOTIFICATION_ERROR_ID);
//cancel for old file because of file conflicts
OCFile oldFile = uploadFileOperation.getOldFile();
if ( oldFile != null) {
mNotificationManager.cancel(NotificationUtils.createUploadNotificationTag(oldFile),
NOTIFICATION_ERROR_ID);
}
}