Skip to content

Commit

Permalink
Open file when fetching task completed
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Oct 25, 2023
1 parent 2f62627 commit cfbb3ba
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -84,7 +85,7 @@ protected String doInBackground(Void... voids) {

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);

Expand Down Expand Up @@ -118,6 +119,6 @@ protected String doInBackground(Void... voids) {
protected void onPostExecute(String message) {
super.onPostExecute(message);

fileDisplayActivity.showFile(null, message);
fileDisplayActivity.showFile(ocFile, message);
}
}

0 comments on commit cfbb3ba

Please sign in to comment.