mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
:Conflict files are removed from the upload storage manager after downloaded successfully.
This commit is contained in:
parent
60e44986a0
commit
e6b6c6ff56
2 changed files with 3 additions and 7 deletions
|
@ -78,9 +78,6 @@
|
||||||
<option name="FOR_BRACE_FORCE" value="3" />
|
<option name="FOR_BRACE_FORCE" value="3" />
|
||||||
<option name="FIELD_ANNOTATION_WRAP" value="0" />
|
<option name="FIELD_ANNOTATION_WRAP" value="0" />
|
||||||
</codeStyleSettings>
|
</codeStyleSettings>
|
||||||
<codeStyleSettings language="Markdown">
|
|
||||||
<option name="RIGHT_MARGIN" value="120" />
|
|
||||||
</codeStyleSettings>
|
|
||||||
<codeStyleSettings language="XML">
|
<codeStyleSettings language="XML">
|
||||||
<indentOptions>
|
<indentOptions>
|
||||||
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
|
|
@ -632,6 +632,9 @@ public class FileDownloader extends Service
|
||||||
|
|
||||||
if (!downloadResult.isCancelled()) {
|
if (!downloadResult.isCancelled()) {
|
||||||
if (downloadResult.isSuccess()) {
|
if (downloadResult.isSuccess()) {
|
||||||
|
if (conflictUploadId > 0) {
|
||||||
|
uploadsStorageManager.removeUpload(conflictUploadId);
|
||||||
|
}
|
||||||
// Dont show notification except an error has occured.
|
// Dont show notification except an error has occured.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -667,10 +670,6 @@ public class FileDownloader extends Service
|
||||||
|
|
||||||
// Remove success notification
|
// Remove success notification
|
||||||
if (downloadResult.isSuccess()) {
|
if (downloadResult.isSuccess()) {
|
||||||
if (conflictUploadId > 0) {
|
|
||||||
uploadsStorageManager.removeUpload(conflictUploadId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sleep 2 seconds, so show the notification before remove it
|
// Sleep 2 seconds, so show the notification before remove it
|
||||||
NotificationUtils.cancelWithDelay(mNotificationManager,
|
NotificationUtils.cancelWithDelay(mNotificationManager,
|
||||||
R.string.downloader_download_succeeded_ticker, 2000);
|
R.string.downloader_download_succeeded_ticker, 2000);
|
||||||
|
|
Loading…
Reference in a new issue