Fix spoiler with media

This commit is contained in:
Thomas 2022-12-29 14:28:35 +01:00
parent 05a7ac4081
commit 4b1897921a
2 changed files with 2 additions and 1 deletions

View file

@ -111,7 +111,7 @@ public class Status implements Serializable, Cloneable {
public transient boolean setCursorToEnd = false;
public transient int cursorPosition = 0;
public transient boolean submitted = false;
public transient boolean spoilerChecked = false;
public boolean spoilerChecked = false;
public Filter filteredByApp;
public transient Spannable contentSpan;
public transient Spannable contentSpoilerSpan;

View file

@ -1414,6 +1414,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
} else {
holder.binding.contentSpoiler.setVisibility(View.GONE);
}
holder.binding.buttonSensitive.setChecked(statusDraft.spoilerChecked);
holder.binding.buttonSensitive.setOnClickListener(v -> {
if (holder.binding.contentSpoiler.getVisibility() == View.VISIBLE) {
statusDraft.spoilerChecked = false;