improve default post privacy to work like web mastodon, add default post privacy option

This commit is contained in:
Conny Duck 2017-11-27 20:11:31 +01:00
commit 1c2a647569
5 changed files with 94 additions and 168 deletions

View file

@ -16,4 +16,10 @@
<item>60</item>
<item>120</item>
</string-array>
<string-array name="post_privacy_values" inputType="integer">
<item>public</item>
<item>unlisted</item>
<item>private</item>
</string-array>
</resources>

View file

@ -107,7 +107,7 @@
<string name="download_image">Downloading %1$s</string>
<string name="action_copy_link">Copy the link</string>
<string name="send_status_link_to">Share toot URL to…</string>
<string name="send_status_content_to">Share toot to…</string>
@ -146,7 +146,6 @@
<string name="dialog_download_image">Download</string>
<string name="dialog_message_follow_request">Follow request pending: awaiting their response</string>
<string name="dialog_unfollow_warning">Unfollow this account?</string>
<string name="dialog_reply_not_found">Couldn\'t post this status. The status you\'re replying to might not be available. Remove reply info?</string>
<string name="visibility_public">Public: Post to public timelines</string>
<string name="visibility_unlisted">Unlisted: Do not show in public timelines</string>
@ -187,6 +186,15 @@
<item>2 hours</item>
</string-array>
<string name="pref_default_post_privacy">Default post privacy</string>
<string name="pref_publishing">Publishing</string>
<string-array name="post_privacy_names" inputType="integer">
<item>Public</item>
<item>Unlisted</item>
<item>Followers-only</item>
</string-array>
<string name="notification_channel_mention_name">New Mentions</string>
<string name="notification_channel_mention_descriptions">Notifications about new mentions</string>
<string name="notification_channel_follow_name">New Followers</string>
@ -250,4 +258,5 @@
<string name="replying_to">Replying to @%s</string>
<string name="load_more_placeholder_text">load more</string>
</resources>

View file

@ -25,6 +25,17 @@
android:title="@string/pref_title_alway_show_sensitive_media" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_publishing">
<ListPreference
android:defaultValue="public"
android:entries="@array/post_privacy_names"
android:entryValues="@array/post_privacy_values"
android:key="defaultPostPrivacy"
android:summary="%s"
android:title="@string/pref_default_post_privacy" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_title_browser_settings">
<CheckBoxPreference
android:defaultValue="false"