Crash fix

This commit is contained in:
Grishka 2023-07-04 02:51:50 +03:00
parent be7469bd54
commit 2d5089c047
2 changed files with 2 additions and 2 deletions

View File

@ -547,7 +547,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
@Override
public boolean onOptionsItemSelected(MenuItem item){
if(item.getItemId()==R.id.publish){
if(GlobalUserPreferences.altTextReminders)
if(GlobalUserPreferences.altTextReminders && editingStatus==null)
checkAltTextsAndPublish();
else
publish();

View File

@ -560,7 +560,7 @@ public class ComposeMediaViewController{
public boolean areAllAttachmentsImages(){
for(DraftMediaAttachment att:attachments){
if(!att.mimeType.startsWith("image/"))
if((att.mimeType==null && att.serverAttachment.type==Attachment.Type.IMAGE) || !att.mimeType.startsWith("image/"))
return false;
}
return true;