mirror of
https://github.com/nextcloud/android.git
synced 2024-12-19 15:33:00 +03:00
Open file when fetching task completed
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
2f6262789d
commit
cfbb3ba560
1 changed files with 3 additions and 2 deletions
|
@ -43,6 +43,7 @@ public class FetchRemoteFileTask extends AsyncTask<Void, Void, String> {
|
|||
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<Void, Void, String> {
|
|||
|
||||
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<Void, Void, String> {
|
|||
protected void onPostExecute(String message) {
|
||||
super.onPostExecute(message);
|
||||
|
||||
fileDisplayActivity.showFile(null, message);
|
||||
fileDisplayActivity.showFile(ocFile, message);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue