Addressed commit feedback & removed desktop string 'attachmentsClickToDownload' as we use 'attachmentsTapToDownload'

This commit is contained in:
alansley 2024-08-20 09:30:30 +10:00
parent acc8d47c68
commit 816f21bb29
2 changed files with 6 additions and 4 deletions

View File

@ -367,14 +367,17 @@ public class AttachmentManager {
if (slide == null) return false;
// Attachments are excessively large? Not satisfied.
// Note: This file size test must come BEFORE the `constraints.isSatisfied` check below because
// it is a more specific type of check.
if (slide.asAttachment().getSize() > MAX_ATTACHMENTS_FILE_SIZE_BYTES) {
Toast.makeText(context, R.string.attachmentsErrorSize, Toast.LENGTH_SHORT).show();
return false;
}
// Otherwise our constraints-satisfied condition becomes whether we can resize it (obviously
// this will only work on images).
return constraints.canResize(slide.asAttachment());
// Otherwise we return whether our constraints are satisfied OR if we can resize the attachment
// (in the case of one or more images) - either one will be acceptable, but if both aren't then
// we fail the constraint test.
return constraints.isSatisfied(context, slide.asAttachment()) || constraints.canResize(slide.asAttachment());
}
public interface AttachmentListener {

View File

@ -118,7 +118,6 @@
<string name="attachmentsAutoDownloadModalTitle">Auto Download</string>
<string name="attachmentsClearAll">Clear All Attachments</string>
<string name="attachmentsClearAllDescription">Are you sure you want to clear all attachments? Messages with attachments will also be deleted.</string>
<string name="attachmentsClickToDownload">Click to download {file_type}</string>
<string name="attachmentsCollapseOptions">Collapse attachment options</string>
<string name="attachmentsCollecting">Collecting attachments...</string>
<string name="attachmentsDownload">Download Attachment</string>