From 57306ff7fec88458e13e83e782141b5a53a923d1 Mon Sep 17 00:00:00 2001 From: LucasGGamerM Date: Tue, 5 Sep 2023 19:00:16 -0300 Subject: [PATCH] fix(editing-alt-text): fix small oversight on editing existing attachments without alt text This makes the implementation hopefully bug free --- .../android/ui/viewcontrollers/ComposeMediaViewController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeMediaViewController.java b/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeMediaViewController.java index c4e50b1bb..7eba1cd7f 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeMediaViewController.java +++ b/mastodon/src/main/java/org/joinmastodon/android/ui/viewcontrollers/ComposeMediaViewController.java @@ -597,7 +597,7 @@ public class ComposeMediaViewController{ public void saveAltTextsBeforePublishing(Runnable onSuccess, Consumer onError){ ArrayList updateAltTextRequests=new ArrayList<>(); for(DraftMediaAttachment att:attachments){ - if(!att.descriptionSaved && att.serverAttachment.description == null){ + if(!att.descriptionSaved && (fragment.editingStatus==null || !fragment.editingStatus.mediaAttachments.contains(att.serverAttachment))){ UpdateAttachment req=new UpdateAttachment(att.serverAttachment.id, att.description); req.setCallback(new Callback<>(){ @Override