Use `image_matrix_limit` from instance configuration if available
This commit is contained in:
parent
bc78c61009
commit
97e16b9f73
|
@ -313,7 +313,12 @@ public class ComposeMediaViewController{
|
||||||
int maxSize=0;
|
int maxSize=0;
|
||||||
String contentType=fragment.getActivity().getContentResolver().getType(attachment.uri);
|
String contentType=fragment.getActivity().getContentResolver().getType(attachment.uri);
|
||||||
if(contentType!=null && contentType.startsWith("image/")){
|
if(contentType!=null && contentType.startsWith("image/")){
|
||||||
maxSize=2_073_600; // TODO get this from instance configuration when it gets added there
|
Instance instance=fragment.instance;
|
||||||
|
if(instance.configuration!=null && instance.configuration.mediaAttachments!=null && instance.configuration.mediaAttachments.imageMatrixLimit>0){
|
||||||
|
maxSize=instance.configuration.mediaAttachments.imageMatrixLimit;
|
||||||
|
}else{
|
||||||
|
maxSize=2_073_600;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
attachment.progressBar.setProgress(0);
|
attachment.progressBar.setProgress(0);
|
||||||
attachment.speedTracker.reset();
|
attachment.speedTracker.reset();
|
||||||
|
|
Loading…
Reference in New Issue