diff --git a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java index 215fcbecf..8df0e9c5d 100644 --- a/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/ComposeActivity.java @@ -628,6 +628,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana statusDraftList.get(0).mentions.add(mention); } + //There are other mentions to if (statusReply.mentions != null && statusReply.mentions.size() > 0) { for (Mention mentionTmp : statusReply.mentions) { @@ -732,6 +733,11 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana status.id = Helper.generateIdString(); status.mentions = statusList.get(position).mentions; status.visibility = statusList.get(position).visibility; + final SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(ComposeActivity.this); + boolean unlistedReplies = sharedpreferences.getBoolean(getString(R.string.SET_UNLISTED_REPLIES), true); + if (status.visibility.equalsIgnoreCase("public") && unlistedReplies) { + status.visibility = "unlisted"; + } status.spoiler_text = statusList.get(position).spoiler_text; status.sensitive = statusList.get(position).sensitive; statusList.add(status); diff --git a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java index 8316d7cf4..b1c4f8358 100644 --- a/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java +++ b/app/src/main/java/app/fedilab/android/ui/drawer/ComposeAdapter.java @@ -1206,6 +1206,10 @@ public class ComposeAdapter extends RecyclerView.Adapter 1) { + statusDraft.visibility = "unlisted"; + } } switch (statusDraft.visibility.toLowerCase()) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 387527eb4..d41cbed05 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -997,6 +997,8 @@ SET_ART_WITH_NSFW SET_VIDEO_CACHE SET_WATERMARK + SET_UNLISTED_REPLIES + SET_WATERMARK_TEXT SET_PROXY_PASSWORD SET_PROXY_LOGIN @@ -1563,4 +1565,6 @@ Edited at %1$s Created at %1$s Max indentation in threads + Unlisted replies + It only concerns \"public\" replies. When enabled, your replies will automatically have the visibility \"unlisted\" instead of \"public\" diff --git a/app/src/main/res/xml/pref_compose.xml b/app/src/main/res/xml/pref_compose.xml index b3cbfd8cd..1d0a29447 100644 --- a/app/src/main/res/xml/pref_compose.xml +++ b/app/src/main/res/xml/pref_compose.xml @@ -30,6 +30,14 @@ app:summary="@string/set_resize_video_indication" app:title="@string/set_resize_video" /> --> + +