From b7d966a87329c0670db1e3d3de30c952e14af8ea Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 7 Sep 2022 16:18:51 +0200 Subject: [PATCH] Fix issue #276 --- .../android/ui/drawer/ComposeAdapter.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 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 264fb227..106cc482 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 @@ -416,15 +416,22 @@ public class ComposeAdapter extends RecyclerView.Adapter url.trim().length()) { + statusList.get(position).text = content; statusList.get(position).text += "\n\n"; + addUrl = false; } else { - statusList.get(position).text = ""; + if (title != null || subject != null) { + statusList.get(position).text = title != null ? title : subject; + statusList.get(position).text += "\n\n"; + } else { + statusList.get(position).text = ""; + } } statusList.get(position).text += description != null ? description : content; - statusList.get(position).text += "\n\n"; - if (url != null) { + if (url != null && addUrl) { + statusList.get(position).text += "\n\n"; statusList.get(position).text += url; } if (saveFilePath != null) {