Commit 6bc184d4 authored by Thomas's avatar Thomas
Browse files

Fix issue #369 - Spoiler removed when adding a media

parent d76d6990
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -109,6 +109,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 enum PositionFetchMore {
        TOP,
+10 −2
Original line number Diff line number Diff line
@@ -1229,11 +1229,19 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
                holder.binding.buttonVisibility.setImageResource(R.drawable.ic_compose_visibility_public);
                statusDraft.visibility = MastodonHelper.visibility.PUBLIC.name();
            });
            if (statusDraft.spoilerChecked) {
                holder.binding.contentSpoiler.setVisibility(View.VISIBLE);
            } else {
                holder.binding.contentSpoiler.setVisibility(View.GONE);
            }
            holder.binding.buttonSensitive.setOnClickListener(v -> {
                if (holder.binding.contentSpoiler.getVisibility() == View.VISIBLE)
                if (holder.binding.contentSpoiler.getVisibility() == View.VISIBLE) {
                    statusDraft.spoilerChecked = false;
                    holder.binding.contentSpoiler.setVisibility(View.GONE);
                else
                } else {
                    holder.binding.contentSpoiler.setVisibility(View.VISIBLE);
                    statusDraft.spoilerChecked = true;
                }
            });
            //Last compose drawer
            buttonVisibility(holder);