diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java index 0d4b4f0d2..5e4e34485 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/StatusAdapter.java @@ -689,13 +689,9 @@ public class StatusAdapter extends RecyclerView.Adapter statusToDeal.isExpended = true; statusToDeal.isMediaDisplayed = true; } else { - if (context instanceof ContextActivity && statusToDeal.sensitive) { - statusToDeal.isExpended = displayCW; - status.isMediaDisplayed = displayCW; - } holder.binding.spoilerExpand.setOnClickListener(v -> { - statusToDeal.isExpended = !status.isExpended; - statusToDeal.isMediaDisplayed = !status.isMediaDisplayed; + statusToDeal.isExpended = !statusToDeal.isExpended; + statusToDeal.isMediaDisplayed = !statusToDeal.isMediaDisplayed; adapter.notifyItemChanged(getPositionAsync(notificationList, statusList, statusToDeal)); }); holder.binding.spoilerExpand.setVisibility(View.VISIBLE); @@ -742,7 +738,6 @@ public class StatusAdapter extends RecyclerView.Adapter } else { holder.binding.containerTrans.setVisibility(View.GONE); } - if (status.spoiler_text == null || status.spoiler_text.trim().isEmpty() || statusToDeal.isExpended) { if (statusToDeal.content.trim().length() == 0) { holder.binding.mediaContainer.setVisibility(View.GONE); diff --git a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java index f7e2e4ba5..fc993614d 100644 --- a/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java +++ b/app/src/main/java/app/fedilab/android/ui/fragment/timeline/FragmentMastodonContext.java @@ -14,6 +14,7 @@ package app.fedilab.android.ui.fragment.timeline; * You should have received a copy of the GNU General Public License along with Fedilab; if not, * see . */ +import static app.fedilab.android.activities.ContextActivity.displayCW; import static app.fedilab.android.activities.ContextActivity.expand; import android.content.BroadcastReceiver; @@ -192,8 +193,13 @@ public class FragmentMastodonContext extends Fragment { } public void refresh() { - if (statusAdapter != null && statuses != null) { - statusAdapter.notifyItemRangeChanged(0, statuses.size()); + if (statuses != null) { + for (Status status : statuses) { + status.isExpended = displayCW; + } + if (statusAdapter != null) { + statusAdapter.notifyItemRangeChanged(0, statuses.size()); + } } }