mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 18:28:59 +03:00
Merge pull request #2387 from nextcloud/fileNotFound
OnServiceConnnected: File not found
This commit is contained in:
commit
958257ba74
2 changed files with 3 additions and 2 deletions
|
@ -120,7 +120,8 @@ public class FileDataStorageManager {
|
|||
}
|
||||
|
||||
|
||||
public OCFile getFileById(long id) {
|
||||
public @Nullable
|
||||
OCFile getFileById(long id) {
|
||||
Cursor c = getFileCursorForValue(ProviderTableMeta._ID, String.valueOf(id));
|
||||
OCFile file = null;
|
||||
if (c.moveToFirst()) {
|
||||
|
|
|
@ -1545,7 +1545,7 @@ public class FileDisplayActivity extends HookActivity
|
|||
if (mWaitingToPreview != null && getStorageManager() != null) {
|
||||
// update the file
|
||||
mWaitingToPreview = getStorageManager().getFileById(mWaitingToPreview.getFileId());
|
||||
if (!mWaitingToPreview.isDown()) {
|
||||
if (mWaitingToPreview != null && !mWaitingToPreview.isDown()) {
|
||||
requestForDownload();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue