diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-01-01 16:46:59 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-01-01 16:46:59 +0100 |
commit | 7303e7faa8258ae49f3ce1e384b5817537ef16ed (patch) | |
tree | f1b59a65a9695cffb9dbd65ce4e42652c485362b /app/src | |
parent | 95f40595090085f68e8733aaf36a742971477630 (diff) |
Spoiler text when editing
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java index dcfc31473..6e8f290d2 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java @@ -1023,13 +1023,13 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder for (Attachment attachment : attachmentList) { ComposeAttachmentItemBinding composeAttachmentItemBinding = ComposeAttachmentItemBinding.inflate(LayoutInflater.from(context), holder.binding.attachmentsList, false); composeAttachmentItemBinding.buttonPlay.setVisibility(View.GONE); - if (editMessageId != null) { + /* if (editMessageId != null) { composeAttachmentItemBinding.editPreview.setVisibility(View.INVISIBLE); composeAttachmentItemBinding.buttonDescription.setVisibility(View.INVISIBLE); composeAttachmentItemBinding.buttonOrderDown.setVisibility(View.INVISIBLE); composeAttachmentItemBinding.buttonOrderUp.setVisibility(View.INVISIBLE); composeAttachmentItemBinding.buttonRemove.setVisibility(View.INVISIBLE); - } + }*/ String attachmentPath = attachment.local_path != null && !attachment.local_path.trim().isEmpty() ? attachment.local_path : attachment.preview_url; if (attachment.type != null || attachment.mimeType != null) { if ((attachment.type != null && attachment.type.toLowerCase().startsWith("image")) || (attachment.mimeType != null && attachment.mimeType.toLowerCase().startsWith("image"))) { @@ -1440,7 +1440,8 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder statusDraft.visibility = MastodonHelper.visibility.PUBLIC.name(); unlisted_changed = true; }); - if (statusDraft.spoilerChecked) { + + if (statusDraft.spoilerChecked || statusDraft.spoiler_text != null && statusDraft.spoiler_text.trim().length() > 0) { holder.binding.contentSpoiler.setVisibility(View.VISIBLE); } else { holder.binding.contentSpoiler.setVisibility(View.GONE); |