From aaa65899f6e1799ec51778a4820ff7882e4d2511 Mon Sep 17 00:00:00 2001 From: Ida Delphine Date: Thu, 29 Oct 2026 15:00:17 -0700 Subject: [PATCH] add notifications preference keys --- .../composeResources/values/strings.xml | 10 ++++++++ .../preferences/NotificationPreferences.kt | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 shared/src/commonMain/kotlin/net/newpipe/app/preferences/NotificationPreferences.kt diff --git a/shared/src/commonMain/composeResources/values/strings.xml b/shared/src/commonMain/composeResources/values/strings.xml index 8272b7925..86a80d1af 100644 --- a/shared/src/commonMain/composeResources/values/strings.xml +++ b/shared/src/commonMain/composeResources/values/strings.xml @@ -316,5 +316,15 @@ %1$d days + + Player notification + Configure current playing stream notification + New streams notifications + Notify about new streams from subscriptions + Checking frequency + Required network connection + Any network + Channels + Notifications are disabled diff --git a/shared/src/commonMain/kotlin/net/newpipe/app/preferences/NotificationPreferences.kt b/shared/src/commonMain/kotlin/net/newpipe/app/preferences/NotificationPreferences.kt new file mode 100644 index 000000000..fed7202bd --- /dev/null +++ b/shared/src/commonMain/kotlin/net/newpipe/app/preferences/NotificationPreferences.kt @@ -0,0 +1,24 @@ +/* + * SPDX-FileCopyrightText: 2026 NewPipe e.V. + * 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 +}