From 6c0d4778b7828ce131a214c00c20a5d90bc38ebd Mon Sep 17 00:00:00 2001 From: sk Date: Thu, 26 Jan 2023 16:18:19 +0100 Subject: [PATCH] separate notification toggle for polls --- .../joinmastodon/android/fragments/SettingsFragment.java | 6 ++++-- mastodon/src/main/res/values/strings_sk.xml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java b/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java index 8691d8e9d..493b2113a 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java +++ b/mastodon/src/main/java/org/joinmastodon/android/fragments/SettingsFragment.java @@ -253,8 +253,9 @@ public class SettingsFragment extends MastodonToolbarFragment{ items.add(new SwitchItem(R.string.notify_follow, R.drawable.ic_fluent_person_add_24_regular, pushSubscription.alerts.follow, i->onNotificationsChanged(PushNotification.Type.FOLLOW, i.checked), switchEnabled)); items.add(new SwitchItem(R.string.notify_reblog, R.drawable.ic_fluent_arrow_repeat_all_24_regular, pushSubscription.alerts.reblog, i->onNotificationsChanged(PushNotification.Type.REBLOG, i.checked), switchEnabled)); items.add(new SwitchItem(R.string.notify_mention, R.drawable.ic_fluent_mention_24_regular, pushSubscription.alerts.mention, i->onNotificationsChanged(PushNotification.Type.MENTION, i.checked), switchEnabled)); - items.add(new SwitchItem(R.string.sk_notify_update, R.drawable.ic_fluent_history_24_regular, pushSubscription.alerts.update, i->onNotificationsChanged(PushNotification.Type.UPDATE, i.checked), switchEnabled)); items.add(new SwitchItem(R.string.sk_notify_posts, R.drawable.ic_fluent_chat_24_regular, pushSubscription.alerts.status, i->onNotificationsChanged(PushNotification.Type.STATUS, i.checked), switchEnabled)); + items.add(new SwitchItem(R.string.sk_notify_update, R.drawable.ic_fluent_history_24_regular, pushSubscription.alerts.update, i->onNotificationsChanged(PushNotification.Type.UPDATE, i.checked), switchEnabled)); + items.add(new SwitchItem(R.string.sk_notify_poll_results, R.drawable.ic_fluent_poll_24_regular, pushSubscription.alerts.poll, i->onNotificationsChanged(PushNotification.Type.POLL, i.checked), switchEnabled)); items.add(new HeaderItem(R.string.settings_account)); items.add(new TextItem(R.string.sk_settings_profile, ()->UiUtils.launchWebBrowser(getActivity(), "https://"+session.domain+"/settings/profile"), R.drawable.ic_fluent_open_24_regular)); @@ -474,7 +475,8 @@ public class SettingsFragment extends MastodonToolbarFragment{ case FAVORITE -> subscription.alerts.favourite=enabled; case FOLLOW -> subscription.alerts.follow=enabled; case REBLOG -> subscription.alerts.reblog=enabled; - case MENTION -> subscription.alerts.mention=subscription.alerts.poll=enabled; + case MENTION -> subscription.alerts.mention=enabled; + case POLL -> subscription.alerts.poll=enabled; case STATUS -> subscription.alerts.status=enabled; case UPDATE -> subscription.alerts.update=enabled; } diff --git a/mastodon/src/main/res/values/strings_sk.xml b/mastodon/src/main/res/values/strings_sk.xml index 60900f2ed..77faaa829 100644 --- a/mastodon/src/main/res/values/strings_sk.xml +++ b/mastodon/src/main/res/values/strings_sk.xml @@ -250,4 +250,5 @@ Users signing up New reports Server version: %s + Poll results \ No newline at end of file