From cfbb3ba56074a8633eb77b4772060373e0f16cb8 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Wed, 25 Oct 2023 10:54:52 +0200 Subject: [PATCH] Open file when fetching task completed Signed-off-by: alperozturk --- .../owncloud/android/ui/asynctasks/FetchRemoteFileTask.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/asynctasks/FetchRemoteFileTask.java b/app/src/main/java/com/owncloud/android/ui/asynctasks/FetchRemoteFileTask.java index 0cc7d24a72..7c7f68fa25 100644 --- a/app/src/main/java/com/owncloud/android/ui/asynctasks/FetchRemoteFileTask.java +++ b/app/src/main/java/com/owncloud/android/ui/asynctasks/FetchRemoteFileTask.java @@ -43,6 +43,7 @@ public class FetchRemoteFileTask extends AsyncTask { private final String fileId; private final FileDataStorageManager storageManager; private final FileDisplayActivity fileDisplayActivity; + private OCFile ocFile; public FetchRemoteFileTask(User user, String fileId, @@ -84,7 +85,7 @@ public class FetchRemoteFileTask extends AsyncTask { RemoteFile remoteFile = (RemoteFile) result.getData().get(0); - OCFile ocFile = FileStorageUtils.fillOCFile(remoteFile); + ocFile = FileStorageUtils.fillOCFile(remoteFile); FileStorageUtils.searchForLocalFileInDefaultPath(ocFile, user.getAccountName()); ocFile = storageManager.saveFileWithParent(ocFile, fileDisplayActivity); @@ -118,6 +119,6 @@ public class FetchRemoteFileTask extends AsyncTask { protected void onPostExecute(String message) { super.onPostExecute(message); - fileDisplayActivity.showFile(null, message); + fileDisplayActivity.showFile(ocFile, message); } }