Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d079bd5 authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #2276 from rhari991/attachment-diskfull

Show error toast when trying to save attachment and external storage is full
parents 206e168a f4e84c30
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -123,6 +123,12 @@ public class AttachmentController {
            return;
        }

        if (attachment.size > directory.getFreeSpace()) {
            String message = context.getString(R.string.message_view_status_no_space);
            displayMessageToUser(message);
            return;
        }

        if (!attachment.isContentAvailable) {
            downloadAndSaveAttachmentTo((LocalPart) attachment.part, directory);
        } else {
+1 −0
Original line number Diff line number Diff line
@@ -285,6 +285,7 @@ Please submit bug reports, contribute new features and ask questions at
    <string name="message_view_attachment_view_action">Open</string>
    <string name="message_view_attachment_download_action">Save</string>
    <string name="message_view_status_attachment_not_saved">Unable to save attachment to SD card.</string>
    <string name="message_view_status_no_space">The attachment could not be saved as there is not enough space.</string>
    <string name="message_view_show_pictures_action">Show pictures</string>
    <string name="message_view_no_viewer">Unable to find viewer for <xliff:g id="mimetype">%s</xliff:g>.</string>
    <string name="message_view_download_remainder">Download complete message</string>