diff --git a/app/src/main/java/app/fedilab/android/client/entities/api/Status.java b/app/src/main/java/app/fedilab/android/client/entities/api/Status.java index 7c39f4874..585eccec2 100644 --- a/app/src/main/java/app/fedilab/android/client/entities/api/Status.java +++ b/app/src/main/java/app/fedilab/android/client/entities/api/Status.java @@ -103,8 +103,6 @@ public class Status implements Serializable, Cloneable { public boolean isTruncated = true; public boolean isFetchMore = false; public PositionFetchMore positionFetchMore = PositionFetchMore.BOTTOM; - public boolean isMediaDisplayed = false; - public boolean isMediaObfuscated = true; public boolean isChecked = false; public String translationContent; public boolean translationShown; 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 fc8733487..7c079c84e 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 @@ -1021,11 +1021,9 @@ public class StatusAdapter extends RecyclerView.Adapter new WeakReference<>(holder.binding.spoiler), () -> recyclerView.post(() -> adapter.notifyItemChanged(holder.getBindingAdapterPosition()))), TextView.BufferType.SPANNABLE); statusToDeal.isExpended = true; - statusToDeal.isMediaDisplayed = true; } else { holder.binding.spoilerExpand.setOnClickListener(v -> { statusToDeal.isExpended = !statusToDeal.isExpended; - statusToDeal.isMediaDisplayed = !statusToDeal.isMediaDisplayed; adapter.notifyItemChanged(holder.getBindingAdapterPosition()); }); holder.binding.spoilerExpand.setVisibility(View.VISIBLE); @@ -2025,7 +2023,7 @@ public class StatusAdapter extends RecyclerView.Adapter layoutMediaBinding.viewDescription.setVisibility(View.GONE); } - if (!mediaObfuscated(statusToDeal) || expand_media) { + if (!statusToDeal.sensitive || expand_media) { layoutMediaBinding.viewHide.setImageResource(R.drawable.ic_baseline_visibility_24); RequestBuilder requestBuilder = Glide.with(layoutMediaBinding.media.getContext()) .load(attachment.preview_url); @@ -2051,8 +2049,8 @@ public class StatusAdapter extends RecyclerView.Adapter } layoutMediaBinding.media.setOnClickListener(v -> { - if (statusToDeal.isMediaObfuscated && mediaObfuscated(statusToDeal) && !expand_media) { - statusToDeal.isMediaObfuscated = false; + if (statusToDeal.sensitive && !expand_media) { + statusToDeal.sensitive = false; int position = holder.getBindingAdapterPosition(); adapter.notifyItemChanged(position); @@ -2062,7 +2060,7 @@ public class StatusAdapter extends RecyclerView.Adapter } public void onFinish() { - statusToDeal.isMediaObfuscated = true; + statusToDeal.sensitive = true; adapter.notifyItemChanged(position); } }.start(); @@ -2099,7 +2097,7 @@ public class StatusAdapter extends RecyclerView.Adapter mRecyclerView = recyclerView; } - private static boolean mediaObfuscated(Status status) { + /* private static boolean mediaObfuscated(Status status) { //Media is not sensitive and doesn't have a spoiler text if (!status.isMediaObfuscated) { return false; @@ -2112,7 +2110,7 @@ public class StatusAdapter extends RecyclerView.Adapter } else { return status.sensitive; } - } + }*/ /** * Send a broadcast to other open fragments that content a timeline