add notifications preference keys

This commit is contained in:
Ida Delphine authored and Aayush Gupta committed 2026-11-10 17:46:11 +08:00
1 parent 29e6454ac6
commit aaa65899f6
2 files changed
+34

No files matched your search

@@ -316,5 +316,15 @@
<item quantity="other">%1$d days</item>
</plurals>
<!-- Notification Settings -->
<string name="settings_category_player_notification_title">Player notification</string>
<string name="settings_category_player_notification_summary">Configure current playing stream notification</string>
<string name="enable_streams_notifications_title">New streams notifications</string>
<string name="enable_streams_notifications_summary">Notify about new streams from subscriptions</string>
<string name="streams_notifications_interval_title">Checking frequency</string>
<string name="streams_notifications_network_title">Required network connection</string>
<string name="any_network">Any network</string>
<string name="channels">Channels</string>
<string name="notifications_disabled">Notifications are disabled</string>
</resources>
@@ -0,0 +1,24 @@
/*
* SPDX-FileCopyrightText: 2026 NewPipe e.V. <https://newpipe-ev.de>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
package net.newpipe.app.preferences
/**
* Preference keys, values, and defaults for the Notifications settings screen
*/
object NotificationPreferences {
const val KEY_ENABLE_STREAMS_NOTIFICATIONS = "enable_streams_notifications"
const val KEY_STREAMS_NOTIFICATIONS_INTERVAL = "streams_notifications_interval"
const val KEY_STREAMS_NOTIFICATIONS_NETWORK = "streams_notifications_network"
const val NETWORK_ANY = "any"
const val NETWORK_WIFI = "wifi"
val STREAMS_NOTIFICATIONS_INTERVALS = listOf("900", "1800", "3600", "7200", "14400", "43200", "86400")
const val DEFAULT_ENABLE_STREAMS_NOTIFICATIONS = false
const val DEFAULT_STREAMS_NOTIFICATIONS_INTERVAL = "14400"
const val DEFAULT_STREAMS_NOTIFICATIONS_NETWORK = NETWORK_WIFI
}