From fc966d4964aad3e930721d13bcd4af4f6798b7a0 Mon Sep 17 00:00:00 2001 From: tom79 Date: Sun, 28 Apr 2019 14:30:37 +0200 Subject: [PATCH] Allow polls for private messages --- .../java/fr/gouv/etalab/mastodon/activities/TootActivity.java | 4 ++-- .../etalab/mastodon/drawers/NotificationsListAdapter.java | 2 -- .../fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java index 1f296f8b2..ace06bd5e 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/TootActivity.java @@ -1517,11 +1517,11 @@ public class TootActivity extends BaseActivity implements OnPostActionInterface, toot_it.setEnabled(true); return; } - if( poll != null && visibility.equals("direct")){ + /*if( poll != null && visibility.equals("direct")){ Toasty.error(getApplicationContext(),getString(R.string.poll_not_private),Toast.LENGTH_LONG).show(); toot_it.setEnabled(true); return; - } + }*/ SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE); boolean split_toot = sharedpreferences.getBoolean(Helper.SET_AUTOMATICALLY_SPLIT_TOOTS, false); int split_toot_size = sharedpreferences.getInt(Helper.SET_AUTOMATICALLY_SPLIT_TOOTS_SIZE, Helper.SPLIT_TOOT_SIZE); diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java index 6f569cde2..94e354192 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/NotificationsListAdapter.java @@ -1347,8 +1347,6 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On //Poll LinearLayout poll_container, single_choice, multiple_choice, rated; RadioGroup radio_group; - RadioButton r_choice_1, r_choice_2, r_choice_3, r_choice_4; - CheckBox c_choice_1, c_choice_2, c_choice_3, c_choice_4; HorizontalBar choices; TextView number_votes, remaining_time; Button submit_vote, refresh_poll; diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java index cc1b98071..c9200e7b4 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/StatusListAdapter.java @@ -355,8 +355,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct //Poll LinearLayout poll_container, single_choice, multiple_choice, rated; RadioGroup radio_group; - RadioButton r_choice_1, r_choice_2, r_choice_3, r_choice_4; - CheckBox c_choice_1, c_choice_2, c_choice_3, c_choice_4; + HorizontalBar choices; TextView number_votes, remaining_time; Button submit_vote, refresh_poll;