fix throttling default value

This commit is contained in:
kosyak 2024-05-20 22:48:08 +02:00
parent 8c1d825bf3
commit fb3e46e30a
3 changed files with 3 additions and 2 deletions

View file

@ -945,7 +945,7 @@ public class NotificationService {
return false;
}
long throttlingPeriod = mXmppConnectionService.getLongPreference("notification_throttling_period", 0);
long throttlingPeriod = mXmppConnectionService.getLongPreference("notification_throttling_period", R.integer.default_notification_throttling_period);
if (throttlingPeriod <= 0) {
return false;

View file

@ -16,6 +16,7 @@
<string name="notification_ringtone">content://settings/system/notification_sound</string>
<string name="incoming_call_ringtone">content://settings/system/ringtone</string>
<integer name="grace_period">144</integer>
<integer name="default_notification_throttling_period">0</integer>
<integer name="auto_accept_filesize">524288</integer>
<string name="picture_compression">auto</string>
<bool name="use_green_background">true</bool>

View file

@ -80,7 +80,7 @@
android:summary="@string/pref_notification_grace_period_summary"
android:title="@string/pref_notification_grace_period" />
<ListPreference
android:defaultValue="0"
android:defaultValue="@integer/default_notification_throttling_period"
android:entries="@array/notification_throttling_periods"
android:entryValues="@array/notification_throttling_periods_values"
android:key="notification_throttling_period"