mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
#990 displaying path of stored file after successful storage.
This commit is contained in:
committed by
B. Petersen
parent
2cc1d8265b
commit
3edb0cd79c
@@ -198,6 +198,7 @@
|
||||
<string name="share_location_for_two_hours">for 2 hours</string>
|
||||
<string name="share_location_for_six_hours">for 6 hours</string>
|
||||
|
||||
<string name="exported_attachment_to">Saved file to %1$s</string>
|
||||
|
||||
<!-- get confirmations -->
|
||||
<string name="ask_leave_group">Are you sure you want to leave this group?</string>
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user