Add per-contact notification channels.

Fixes #8119
Fixes #8121
Fixes #8122
This commit is contained in:
Greyson Parrelli
2018-08-16 09:47:43 -07:00
parent e23fd9d491
commit e9b85a10a6
20 changed files with 609 additions and 68 deletions

View File

@@ -666,13 +666,14 @@
<string name="MessageNotifier_unknown_contact_message">Contact</string>
<!-- Notification Channels -->
<string name="NotificationChannel_messages">Messages</string>
<string name="NotificationChannel_messages">Default</string>
<string name="NotificationChannel_calls">Calls</string>
<string name="NotificationChannel_failures">Failures</string>
<string name="NotificationChannel_backups">Backups</string>
<string name="NotificationChannel_locked_status">Lock status</string>
<string name="NotificationChannel_app_updates">App updates</string>
<string name="NotificationChannel_other">Other</string>
<string name="NotificationChannel_group_messages">Messages</string>
<!-- QuickResponseService -->
<string name="QuickResponseService_quick_response_unavailable_when_Signal_is_locked">Quick response unavailable when Signal is locked!</string>
@@ -960,6 +961,8 @@
<!-- recipient_preferences -->
<string name="recipient_preferences__mute_conversation">Mute conversation</string>
<string name="recipient_preferences__custom_notifications">Custom notifications</string>
<string name="recipient_preferences__custom_notifications_settings">System notification settings</string>
<string name="recipient_preferences__notification_sound">Notification sound</string>
<string name="recipient_preferences__vibrate">Vibrate</string>
<string name="recipient_preferences__block">Block</string>
@@ -1086,6 +1089,7 @@
<string name="preferences__inactivity_timeout_passphrase">Inactivity timeout passphrase</string>
<string name="preferences__inactivity_timeout_interval">Inactivity timeout interval</string>
<string name="preferences__notifications">Notifications</string>
<string name="preferences__system_notification_settings">System notification settings</string>
<string name="preferences__led_color">LED color</string>
<string name="preferences__led_color_unknown">Unknown</string>
<string name="preferences__pref_led_blink_title">LED blink pattern</string>

View File

@@ -9,6 +9,12 @@
android:title="@string/preferences__notifications"
android:defaultValue="true" />
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:key="pref_key_system_notification_settings"
android:dependency="pref_key_enable_notifications"
android:persistent="false"
android:title="@string/preferences__system_notification_settings" />
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:dependency="pref_key_enable_notifications"
android:key="pref_key_ringtone"

View File

@@ -16,6 +16,18 @@
android:disableDependentsState="true"
android:persistent="false" />
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:key="pref_key_recipient_custom_notifications"
android:title="@string/recipient_preferences__custom_notifications"
android:defaultValue="false"
android:persistent="false" />
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:key="pref_key_recipient_notification_settings"
android:dependency="pref_key_recipient_custom_notifications"
android:title="@string/recipient_preferences__custom_notifications_settings"
android:persistent="false" />
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:dependency="pref_key_recipient_mute"
android:key="pref_key_recipient_ringtone"