Implement optional separate app notification channels

This commit is contained in:
Niko Diamadis
2023-02-13 12:24:40 +01:00
parent 8bae62cc24
commit ddd902e17e
8 changed files with 238 additions and 37 deletions

View File

@@ -34,4 +34,5 @@
</string-array>
<string name="time_format_value_absolute">time_format_absolute</string>
<string name="time_format_value_relative">time_format_relative</string>
<bool name="notification_channels">false</bool>
</resources>

View File

@@ -80,6 +80,11 @@
<string name="setting_message_layout_dialog_button2">Later</string>
<string name="setting_time_format">Time format</string>
<string name="setting_key_time_format">time_format</string>
<string name="setting_notifications">Notifications</string>
<string name="setting_notification_channels">Separate app notification channels</string>
<string name="setting_key_notification_channels">notification_channels</string>
<string name="setting_notification_channels_dialog_title">Manual refresh required</string>
<string name="setting_notification_channels_dialog_message">For the change to take effect you must manually refresh the apps using the refresh button in the main menu.</string>
<string name="push_message">Push message</string>
<string name="appListDescription">App:</string>
<string name="priorityDescription">Priority:</string>
@@ -97,4 +102,10 @@
<item quantity="one">in %d minute</item>
<item quantity="other">in %d minutes</item>
</plurals>
<string name="notification_channel_title_foreground">Gotify foreground notification</string>
<string name="notification_channel_title_min">Min priority messages (&lt;1)</string>
<string name="notification_channel_title_low">Low priority messages (13)</string>
<string name="notification_channel_title_normal">Normal priority messages (47)</string>
<string name="notification_channel_title_high">High priority messages (>7)</string>
</resources>

View File

@@ -24,4 +24,13 @@
android:title="@string/setting_time_format" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/setting_notifications" >
<SwitchPreferenceCompat
android:enabled="false"
android:defaultValue="@bool/notification_channels"
android:key="@string/setting_key_notification_channels"
android:title="@string/setting_notification_channels"
app:singleLineTitle="false" />
</PreferenceCategory>
</PreferenceScreen>