From d6a66656deef9e9c0a1762f490fef203fb579a60 Mon Sep 17 00:00:00 2001 From: daycode Date: Tue, 18 Apr 2017 12:59:42 +0200 Subject: [PATCH 1/3] Add Direct Message to visibility panel --- .../tusky/ComposeOptionsFragment.java | 12 +++++++-- .../color/drawer_visibility_panel_item.xml | 5 ++++ app/src/main/res/drawable/ic_email_24dp.xml | 9 +++++++ .../main/res/drawable/ic_lock_open_24dp.xml | 9 +++++++ .../res/drawable/ic_lock_outline_24dp.xml | 9 +++++++ .../res/layout/fragment_compose_options.xml | 25 +++++++++++++++++++ app/src/main/res/values/strings.xml | 7 +++--- 7 files changed, 71 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/color/drawer_visibility_panel_item.xml create mode 100644 app/src/main/res/drawable/ic_email_24dp.xml create mode 100644 app/src/main/res/drawable/ic_lock_open_24dp.xml create mode 100644 app/src/main/res/drawable/ic_lock_outline_24dp.xml diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeOptionsFragment.java b/app/src/main/java/com/keylesspalace/tusky/ComposeOptionsFragment.java index 25dbd4b8..3f3e1c0b 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeOptionsFragment.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeOptionsFragment.java @@ -73,10 +73,14 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment { radioCheckedId = R.id.radio_unlisted; } if (statusVisibility != null) { - if (statusVisibility.equals("unlisted")) { - radioCheckedId = R.id.radio_unlisted; + if (statusVisibility.equals("public")) { + radioCheckedId = R.id.radio_public; } else if (statusVisibility.equals("private")) { radioCheckedId = R.id.radio_private; + } else if (statusVisibility.equals("unlisted")) { + radioCheckedId = R.id.radio_unlisted; + } else if (statusVisibility.equals("direct")) { + radioCheckedId = R.id.radio_direct; } } radio.check(radioCheckedId); @@ -113,6 +117,10 @@ public class ComposeOptionsFragment extends BottomSheetDialogFragment { visibility = "private"; break; } + case R.id.radio_direct: { + visibility = "direct"; + break; + } } listener.onVisibilityChanged(visibility); } diff --git a/app/src/main/res/color/drawer_visibility_panel_item.xml b/app/src/main/res/color/drawer_visibility_panel_item.xml new file mode 100644 index 00000000..56e4edca --- /dev/null +++ b/app/src/main/res/color/drawer_visibility_panel_item.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_email_24dp.xml b/app/src/main/res/drawable/ic_email_24dp.xml new file mode 100644 index 00000000..a050d6f8 --- /dev/null +++ b/app/src/main/res/drawable/ic_email_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_lock_open_24dp.xml b/app/src/main/res/drawable/ic_lock_open_24dp.xml new file mode 100644 index 00000000..72d7d123 --- /dev/null +++ b/app/src/main/res/drawable/ic_lock_open_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_lock_outline_24dp.xml b/app/src/main/res/drawable/ic_lock_outline_24dp.xml new file mode 100644 index 00000000..a0145706 --- /dev/null +++ b/app/src/main/res/drawable/ic_lock_outline_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/fragment_compose_options.xml b/app/src/main/res/layout/fragment_compose_options.xml index 986fc6e7..818cf656 100644 --- a/app/src/main/res/layout/fragment_compose_options.xml +++ b/app/src/main/res/layout/fragment_compose_options.xml @@ -15,23 +15,48 @@ + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7d053474..c9b7b65e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -111,9 +111,10 @@ Finishing Media Upload Uploading… - Everyone can view - Everyone can view, but not on public timelines - Only followers and mentions can view + Public: Post to public timelines + Unlisted: Do not show in public timelines + Private: Post to followers only + Direct: Post to mentioned users only Notifications Edit Notifications From 2b584249e3a1c0545d95809a2fb2174005661bd0 Mon Sep 17 00:00:00 2001 From: daycode Date: Tue, 18 Apr 2017 14:27:47 +0200 Subject: [PATCH 2/3] French translation for the visibility panel --- app/src/main/res/values-fr/strings.xml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 05fa8750..55e58bb6 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -100,9 +100,10 @@ Média uploadé avec succès Téléversement… - Tout le monde peut voir - Tout le monde peut voir, mais cela ne sera pas listé sur votre timeline public - Uniquement les followers et les mentionnés peuvent voir + Public: Afficher dans les fils publics + Non-listé: Ne pas afficher dans les fils publics + Privé: N\'afficher que pour vos abonné⋅e⋅s + Direct: N\'afficher que pour les personnes mentionnées Notifications Notifications push From 6c385120914c45b92b33ad1eaa8a503583f647da Mon Sep 17 00:00:00 2001 From: daycode Date: Tue, 18 Apr 2017 22:21:34 +0200 Subject: [PATCH 3/3] fix color icon for both themes --- app/src/main/res/color/drawer_visibility_panel_item.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/color/drawer_visibility_panel_item.xml b/app/src/main/res/color/drawer_visibility_panel_item.xml index 56e4edca..9849dfa9 100644 --- a/app/src/main/res/color/drawer_visibility_panel_item.xml +++ b/app/src/main/res/color/drawer_visibility_panel_item.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file