Add FCM option to notification settings

This commit is contained in:
nielsandriesse 2020-04-16 15:33:31 +10:00
parent 6d4398e740
commit 82f2b8ec3e
2 changed files with 16 additions and 0 deletions

View File

@ -1688,5 +1688,8 @@
<string name="sheet_pn_mode_no_option_picked_dialog_title">Please Pick an Option</string> <string name="sheet_pn_mode_no_option_picked_dialog_title">Please Pick an Option</string>
<string name="sheet_pn_mode_confirm_button_title">Confirm</string> <string name="sheet_pn_mode_confirm_button_title">Confirm</string>
<string name="sheet_pn_mode_skip_button_title">Skip</string> <string name="sheet_pn_mode_skip_button_title">Skip</string>
<string name="preferences_notifications_strategy_category_title">Notification Strategy</string>
<string name="preferences_notifications_use_fcm_option_title">Use FCM</string>
<string name="preferences_notifications_use_fcm_option_explanation">Using Firebase Cloud Messaging allows for more reliable push notifications, but exposes your IP to Google.</string>
</resources> </resources>

View File

@ -21,6 +21,19 @@
<PreferenceCategory android:layout="@layout/preference_divider" /> <PreferenceCategory android:layout="@layout/preference_divider" />
<PreferenceCategory android:title="@string/preferences_notifications_strategy_category_title">
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:dependency="pref_key_enable_notifications"
android:key="pref_key_use_fcm"
android:title="@string/preferences_notifications_use_fcm_option_title"
android:summary="@string/preferences_notifications_use_fcm_option_explanation"
android:defaultValue="false" />
</PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider" />
<PreferenceCategory android:title="@string/activity_notification_settings_style_section_title"> <PreferenceCategory android:title="@string/activity_notification_settings_style_section_title">
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference <org.thoughtcrime.securesms.preferences.widgets.SignalPreference