From 1dc9c87c2e372e67aa476fa28c4d4596bd94f7fc Mon Sep 17 00:00:00 2001 From: Vavassor Date: Mon, 26 Jun 2017 15:46:03 -0400 Subject: [PATCH] Fixes public visibility being disabled when replying, and changes the default to public like non-reply posts. --- .../com/keylesspalace/tusky/ComposeActivity.java | 3 +-- .../tusky/fragment/ComposeOptionsFragment.java | 16 ++-------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index f0876e223..865c18ed4 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -64,7 +64,6 @@ import android.view.LayoutInflater; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; -import android.view.WindowManager; import android.webkit.MimeTypeMap; import android.widget.ArrayAdapter; import android.widget.Button; @@ -541,7 +540,7 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm private void showComposeOptions() { ComposeOptionsFragment fragment = ComposeOptionsFragment.newInstance( - statusVisibility, statusHideText, inReplyToId != null); + statusVisibility, statusHideText); fragment.show(getSupportFragmentManager(), null); } diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ComposeOptionsFragment.java b/app/src/main/java/com/keylesspalace/tusky/fragment/ComposeOptionsFragment.java index ea9300128..42ee7a7b8 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ComposeOptionsFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ComposeOptionsFragment.java @@ -46,13 +46,11 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment { private CheckBox hideText; private Listener listener; - public static ComposeOptionsFragment newInstance(String visibility, boolean hideText, - boolean isReply) { + public static ComposeOptionsFragment newInstance(String visibility, boolean hideText) { Bundle arguments = new Bundle(); ComposeOptionsFragment fragment = new ComposeOptionsFragment(); arguments.putString("visibility", visibility); arguments.putBoolean("hideText", hideText); - arguments.putBoolean("isReply", isReply); fragment.setArguments(arguments); return fragment; } @@ -72,15 +70,9 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment { Bundle arguments = getArguments(); String statusVisibility = arguments.getString("visibility"); boolean statusHideText = arguments.getBoolean("hideText"); - boolean isReply = arguments.getBoolean("isReply"); radio = (RadioGroup) rootView.findViewById(R.id.radio_visibility); - int radioCheckedId; - if (!isReply) { - radioCheckedId = R.id.radio_public; - } else { - radioCheckedId = R.id.radio_unlisted; - } + int radioCheckedId = R.id.radio_public; if (statusVisibility != null) { switch (statusVisibility) { case "public": radioCheckedId = R.id.radio_public; break; @@ -100,10 +92,6 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment { setRadioButtonDrawable(getContext(), privateButton, R.drawable.ic_lock_outline_24dp); setRadioButtonDrawable(getContext(), directButton, R.drawable.ic_email_24dp); - if (isReply) { - publicButton.setEnabled(false); - } - hideText = (CheckBox) rootView.findViewById(R.id.compose_hide_text); hideText.setChecked(statusHideText);