mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-21 15:05:19 +00:00
Addressed commit feedback & removed desktop string 'attachmentsClickToDownload' as we use 'attachmentsTapToDownload'
This commit is contained in:
parent
acc8d47c68
commit
816f21bb29
@ -367,14 +367,17 @@ public class AttachmentManager {
|
|||||||
if (slide == null) return false;
|
if (slide == null) return false;
|
||||||
|
|
||||||
// Attachments are excessively large? Not satisfied.
|
// 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) {
|
if (slide.asAttachment().getSize() > MAX_ATTACHMENTS_FILE_SIZE_BYTES) {
|
||||||
Toast.makeText(context, R.string.attachmentsErrorSize, Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, R.string.attachmentsErrorSize, Toast.LENGTH_SHORT).show();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise our constraints-satisfied condition becomes whether we can resize it (obviously
|
// Otherwise we return whether our constraints are satisfied OR if we can resize the attachment
|
||||||
// this will only work on images).
|
// (in the case of one or more images) - either one will be acceptable, but if both aren't then
|
||||||
return constraints.canResize(slide.asAttachment());
|
// we fail the constraint test.
|
||||||
|
return constraints.isSatisfied(context, slide.asAttachment()) || constraints.canResize(slide.asAttachment());
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface AttachmentListener {
|
public interface AttachmentListener {
|
||||||
|
@ -118,7 +118,6 @@
|
|||||||
<string name="attachmentsAutoDownloadModalTitle">Auto Download</string>
|
<string name="attachmentsAutoDownloadModalTitle">Auto Download</string>
|
||||||
<string name="attachmentsClearAll">Clear All Attachments</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="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="attachmentsCollapseOptions">Collapse attachment options</string>
|
||||||
<string name="attachmentsCollecting">Collecting attachments...</string>
|
<string name="attachmentsCollecting">Collecting attachments...</string>
|
||||||
<string name="attachmentsDownload">Download Attachment</string>
|
<string name="attachmentsDownload">Download Attachment</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user