aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/res
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-02 00:24:37 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-06-02 00:24:37 +0200
commit25211f13b37ecef64d6fa9a382a2c30d212452ae (patch)
tree28c00ef806b77afa4ee8d7a519d4e9968e2b2fb5 /src/main/res
parente43a01159cc511e674ccdfccc3f7fa5f118d4a83 (diff)
make grace period configurable
Diffstat (limited to '')
-rw-r--r--src/main/res/values/arrays.xml12
-rw-r--r--src/main/res/values/strings.xml7
-rw-r--r--src/main/res/xml/preferences.xml45
3 files changed, 44 insertions, 20 deletions
diff --git a/src/main/res/values/arrays.xml b/src/main/res/values/arrays.xml
index e887546a..48dbaabf 100644
--- a/src/main/res/values/arrays.xml
+++ b/src/main/res/values/arrays.xml
@@ -83,4 +83,16 @@
<item>@string/presence_xa</item>
<item>@string/presence_dnd</item>
</string-array>
+
+ <string-array name="grace_periods">
+ <item>@string/gp_short</item>
+ <item>@string/gp_medium</item>
+ <item>@string/gp_long</item>
+ </string-array>
+
+ <string-array name="grace_periods_values">
+ <item>144</item>
+ <item>610</item>
+ <item>2584</item>
+ </string-array>
</resources>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 2decae45..51c658ab 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -117,8 +117,8 @@
<string name="pref_led_summary">Blink notification light when a new message arrives</string>
<string name="pref_sound">Ringtone</string>
<string name="pref_sound_summary">Play sound when a new message arrives</string>
- <string name="pref_notification_grace_period">Notification grace period</string>
- <string name="pref_notification_grace_period_summary">Disable notifications for a short time after a carbon copy was received</string>
+ <string name="pref_notification_grace_period">Grace Period</string>
+ <string name="pref_notification_grace_period_summary">The length of time Conversations keeps quite after seeing activity on another device</string>
<string name="pref_advanced_options">Advanced</string>
<string name="pref_never_send_crash">Never send crash reports</string>
<string name="pref_never_send_crash_summary">By sending in stack traces you are helping the ongoing development of Conversations</string>
@@ -649,4 +649,7 @@
<string name="choose_participants">Choose participants</string>
<string name="creating_conference">Creating conferenceā€¦</string>
<string name="invite_again">Invite again</string>
+ <string name="gp_short">Short</string>
+ <string name="gp_medium">Medium</string>
+ <string name="gp_long">Long</string>
</resources>
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index 80980417..fb0103ed 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -36,6 +36,25 @@
android:key="show_notification"
android:summary="@string/pref_notifications_summary"
android:title="@string/pref_notifications"/>
+ <CheckBoxPreference
+ android:defaultValue="true"
+ android:dependency="show_notification"
+ android:key="vibrate_on_notification"
+ android:summary="@string/pref_vibrate_summary"
+ android:title="@string/pref_vibrate"/>
+ <CheckBoxPreference
+ android:defaultValue="true"
+ android:dependency="show_notification"
+ android:key="led"
+ android:title="@string/pref_led"
+ android:summary="@string/pref_led_summary"/>
+ <RingtonePreference
+ android:defaultValue="content://settings/system/notification_sound"
+ android:dependency="show_notification"
+ android:key="notification_ringtone"
+ android:ringtoneType="notification"
+ android:summary="@string/pref_sound_summary"
+ android:title="@string/pref_sound"/>
<PreferenceScreen
android:dependency="show_notification"
android:key="quiet_hours"
@@ -59,25 +78,15 @@
android:positiveButtonText="@string/set"
android:title="@string/title_pref_quiet_hours_end_time"/>
</PreferenceScreen>
- <CheckBoxPreference
- android:defaultValue="true"
- android:dependency="show_notification"
- android:key="vibrate_on_notification"
- android:summary="@string/pref_vibrate_summary"
- android:title="@string/pref_vibrate"/>
- <CheckBoxPreference
- android:defaultValue="true"
- android:dependency="show_notification"
- android:key="led"
- android:title="@string/pref_led"
- android:summary="@string/pref_led_summary"/>
- <RingtonePreference
- android:defaultValue="content://settings/system/notification_sound"
+ <ListPreference
android:dependency="show_notification"
- android:key="notification_ringtone"
- android:ringtoneType="notification"
- android:summary="@string/pref_sound_summary"
- android:title="@string/pref_sound"/>
+ android:key="grace_period_length"
+ android:title="@string/pref_notification_grace_period"
+ android:summary="@string/pref_notification_grace_period_summary"
+ android:defaultValue="144"
+ android:entries="@array/grace_periods"
+ android:entryValues="@array/grace_periods_values"
+ />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_attachments">