mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Fix again: Download is started over and over when rotating the device
This commit is contained in:
parent
176f02fb04
commit
d700cde6c5
1 changed files with 6 additions and 2 deletions
|
@ -1144,8 +1144,12 @@ OnSslUntrustedCertListener, EditNameDialogListener {
|
|||
if (component.equals(new ComponentName(FileDisplayActivity.this, FileDownloader.class))) {
|
||||
Log_OC.d(TAG, "Download service connected");
|
||||
mDownloaderBinder = (FileDownloaderBinder) service;
|
||||
if (mWaitingToPreview != null && !mWaitingToPreview.isDown()) {
|
||||
requestForDownload();
|
||||
if (mWaitingToPreview != null)
|
||||
if (getStorageManager() != null) {
|
||||
mWaitingToPreview = getStorageManager().getFileById(mWaitingToPreview.getFileId()); // update the file
|
||||
if (!mWaitingToPreview.isDown()) {
|
||||
requestForDownload();
|
||||
}
|
||||
}
|
||||
|
||||
} else if (component.equals(new ComponentName(FileDisplayActivity.this, FileUploader.class))) {
|
||||
|
|
Loading…
Reference in a new issue