#990 displaying path of stored file after successful storage.

This commit is contained in:
Angelo Fuchs 2019-12-28 13:50:26 +01:00 committed by B. Petersen
parent 2cc1d8265b
commit 3edb0cd79c
No known key found for this signature in database
GPG key ID: 3B88E92DEA8E9AFC
2 changed files with 8 additions and 2 deletions

View file

@ -31,7 +31,7 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
private static final int WRITE_ACCESS_FAILURE = 2;
private final WeakReference<Context> contextReference;
public SaveAttachmentTask(Context context) {
super(context,
context.getResources().getString(R.string.one_moment),
@ -63,7 +63,12 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
if (directory == null) return new Pair<>(FAILURE, null);
}
}
final String displayDir = directory;
Util.runOnMain(() -> {
// Tell the user where the file went
// "Saved to " + displayDir
Toast.makeText(context, context.getString(R.string.exported_attachment_to, displayDir), Toast.LENGTH_LONG).show();
});
if (attachments.length > 1) return new Pair<>(SUCCESS, null);
else return new Pair<>(SUCCESS, directory);
} catch (NoExternalStorageException|IOException ioe) {