Adds preferences for receiving notifications by type.

This commit is contained in:
Vavassor 2017-03-28 15:39:29 -04:00
commit 251602fb2c
3 changed files with 92 additions and 36 deletions

View file

@ -101,13 +101,15 @@
<string name="visibility_private">Only followers and mentions can see</string>
<string name="pref_title_notification_settings">Notifications</string>
<string name="pref_title_pull_notifications">Enable pull notifications</string>
<string name="pref_summary_pull_notifications">Check for notifications periodically</string>
<string name="pref_title_pull_notification_check_interval">Check interval</string>
<string name="pref_summary_pull_notification_check_interval">How often to pull</string>
<string name="pref_title_notification_alerts">Alerts</string>
<string name="pref_title_notification_alert_sound">Notify with a sound</string>
<string name="pref_title_notification_style_vibrate">Notify with vibration</string>
<string name="pref_title_notification_style_light">Notify with light</string>
<string name="pref_title_notification_alert_vibrate">Notify with vibration</string>
<string name="pref_title_notification_alert_light">Notify with light</string>
<string name="pref_title_notification_filters">Notify me when</string>
<string name="pref_title_notification_filter_mentions">mentioned</string>
<string name="pref_title_notification_filter_follows">followed</string>
<string name="pref_title_notification_filter_reblogs">my posts are boosted</string>
<string name="pref_title_notification_filter_favourites">my posts are favourited</string>
<string name="pref_title_appearance_settings">Appearance</string>
<string name="pref_title_light_theme">Use the Light Theme</string>
<string name="action_submit">Submit</string>

View file

@ -2,33 +2,6 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:key="@string/preferences_file_key">
<PreferenceCategory android:title="@string/pref_title_notification_settings">
<CheckBoxPreference
android:key="notificationsEnabled"
android:title="@string/pref_title_notifications_enabled"
android:defaultValue="true" />
<CheckBoxPreference
android:dependency="notificationsEnabled"
android:key="notificationAlertSound"
android:title="@string/pref_title_notification_alert_sound"
android:defaultValue="true" />
<CheckBoxPreference
android:dependency="notificationsEnabled"
android:key="notificationStyleVibrate"
android:title="@string/pref_title_notification_style_vibrate"
android:defaultValue="true" />
<CheckBoxPreference
android:dependency="notificationsEnabled"
android:key="notificationStyleLight"
android:title="@string/pref_title_notification_style_light"
android:defaultValue="true" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/pref_title_appearance_settings">
<CheckBoxPreference
@ -38,4 +11,60 @@
</PreferenceCategory>
<PreferenceScreen android:title="@string/pref_title_notification_settings">
<CheckBoxPreference
android:key="notificationsEnabled"
android:title="@string/pref_title_notifications_enabled"
android:defaultValue="true" />
<PreferenceCategory
android:dependency="notificationsEnabled"
android:title="@string/pref_title_notification_filters">
<CheckBoxPreference
android:key="notificationFilterMentions"
android:title="@string/pref_title_notification_filter_mentions"
android:defaultValue="true" />
<CheckBoxPreference
android:key="notificationFilterFollows"
android:title="@string/pref_title_notification_filter_follows"
android:defaultValue="true" />
<CheckBoxPreference
android:key="notificationFilterReblogs"
android:title="@string/pref_title_notification_filter_reblogs"
android:defaultValue="true" />
<CheckBoxPreference
android:key="notificationFilterFavourites"
android:title="@string/pref_title_notification_filter_favourites"
android:defaultValue="true" />
</PreferenceCategory>
<PreferenceCategory
android:dependency="notificationsEnabled"
android:title="@string/pref_title_notification_alerts">
<CheckBoxPreference
android:key="notificationAlertSound"
android:title="@string/pref_title_notification_alert_sound"
android:defaultValue="true" />
<CheckBoxPreference
android:key="notificationAlertVibrate"
android:title="@string/pref_title_notification_alert_vibrate"
android:defaultValue="true" />
<CheckBoxPreference
android:key="notificationAlertLight"
android:title="@string/pref_title_notification_alert_light"
android:defaultValue="true" />
</PreferenceCategory>
</PreferenceScreen>
</PreferenceScreen>