small fix

This commit is contained in:
Thomas 2022-07-04 17:53:33 +02:00
parent df23e3db9c
commit 383702bf6a
1 changed files with 2 additions and 1 deletions

View File

@ -1073,7 +1073,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
}); });
//Disable buttons to attach media if max has been reached //Disable buttons to attach media if max has been reached
if (statusDraft.media_attachments != null && statusDraft.media_attachments.size() >= instanceInfo.configuration.statusesConf.max_media_attachments) { if (statusDraft.media_attachments != null &&
((instanceInfo != null && statusDraft.media_attachments.size() >= instanceInfo.configuration.statusesConf.max_media_attachments) || (instanceInfo == null && statusDraft.media_attachments.size() >= 4))) {
holder.binding.buttonAttachImage.setEnabled(false); holder.binding.buttonAttachImage.setEnabled(false);
holder.binding.buttonAttachVideo.setEnabled(false); holder.binding.buttonAttachVideo.setEnabled(false);
holder.binding.buttonAttachAudio.setEnabled(false); holder.binding.buttonAttachAudio.setEnabled(false);