feat(ui): add test notification preference and optimize Android TV logic

Introduce a "Test Notification" preference in the settings menu to allow users to verify the notification system. This preference is automatically hidden on Android TV devices to maintain a clean UI.

Additionally, refactor notification permission handling to skip requests on Android TV and improve the internal check for Leanback support using a lazy property.

Updated string resources for the new preference across all supported languages.
This commit is contained in:
2026-05-30 22:15:51 +02:00
parent 23079649c5
commit 1879827f4b
12 changed files with 54 additions and 15 deletions
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">App-tema</string>
<string name="pref_update_station_images_summary">Download nyeste stationsbilleder.</string>
<string name="pref_update_station_images_title">Opdater stationsbilleder</string>
<string name="pref_test_notification_title">Testmeddelelse</string>
<string name="pref_test_notification_summary">Test om meddelelsessystemet virker.</string>
<!-- App-genveje -->
<string name="shortcut_last_station_disabled_message">Genvej til seneste station er deaktiveret.</string>
<string name="shortcut_last_station_long_label">Afspil seneste station</string>
+2
View File
@@ -95,6 +95,8 @@
<string name="pref_theme_selection_title">App-Design</string>
<string name="pref_update_station_images_summary">Die neueste Version aller Senderbilder herunterladen.</string>
<string name="pref_update_station_images_title">Senderbilder aktualisieren</string>
<string name="pref_test_notification_title">Test-Benachrichtigung</string>
<string name="pref_test_notification_summary">Testen, ob das Benachrichtigungssystem funktioniert.</string>
<!-- Sample Text -->
<!-- App Shortcuts -->
<string name="shortcut_last_station_disabled_message">Verknüpfung für Wiedergabe des letzten Senders deaktiviert.</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">Θέμα Εφαρμογής</string>
<string name="pref_update_station_images_summary">Κατεβάστε την τελευταία έκδοση των εικόνων όλων των σταθμών.</string>
<string name="pref_update_station_images_title">Ενημέρωση Εικόνων Σταθμών</string>
<string name="pref_test_notification_title">Δοκιμαστική Ειδοποίηση</string>
<string name="pref_test_notification_summary">Έλεγχος αν το σύστημα ειδοποιήσεων λειτουργεί.</string>
<!-- Sample Text -->
<!-- App Shortcuts -->
<string name="shortcut_last_station_disabled_message">Η συντόμευση για την αναπαραγωγή του τελευταίου σταθμού έχει απενεργοποιηθεί.</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">Thème de lapplication</string>
<string name="pref_update_station_images_summary">Télécharger la dernière version de toutes les images des stations.</string>
<string name="pref_update_station_images_title">Mettre à jour les images des stations</string>
<string name="pref_test_notification_title">Notification de test</string>
<string name="pref_test_notification_summary">Tester si le système de notification fonctionne.</string>
<!-- Raccourcis de l'app -->
<string name="shortcut_last_station_disabled_message">Raccourci pour lire la dernière station désactivé.</string>
<string name="shortcut_last_station_long_label">Lire la dernière station</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">アプリテーマ</string>
<string name="pref_update_station_images_summary">すべての局画像を最新に更新します。</string>
<string name="pref_update_station_images_title">局画像を更新</string>
<string name="pref_test_notification_title">テスト通知</string>
<string name="pref_test_notification_summary">通知システムが動作するかテストします。</string>
<!-- ショートカット -->
<string name="shortcut_last_station_disabled_message">最後に再生した局のショートカットは無効になっています。</string>
<string name="shortcut_last_station_long_label">最後の局を再生</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">App Thema</string>
<string name="pref_update_station_images_summary">Download de laatste versie van alle zenderafbeeldingen.</string>
<string name="pref_update_station_images_title">Update Zenderafbeeldingen</string>
<string name="pref_test_notification_title">Testmelding</string>
<string name="pref_test_notification_summary">Test of het meldingsysteem werkt.</string>
<!-- Sample Text -->
<!-- App Shortcuts -->
<string name="shortcut_last_station_disabled_message">Snelkoppeling voor het afspelen van de laatste zender uitgeschakeld.</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">Motyw aplikacji</string>
<string name="pref_update_station_images_summary">Pobierz najnowszą wersję wszystkich obrazów stacji w swojej kolekcji.</string>
<string name="pref_update_station_images_title">Aktualizuj zdjęcia stacji</string>
<string name="pref_test_notification_title">Testowe powiadomienie</string>
<string name="pref_test_notification_summary">Sprawdź, czy system powiadomień działa.</string>
<!-- Sample Text -->
<!-- App Shortcuts -->
<string name="shortcut_last_station_disabled_message">Skrót do odtwarzania ostatniej stacji jest wyłączony.</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">Тема приложения</string>
<string name="pref_update_station_images_summary">Скачать последнюю версию всех изображений станций.</string>
<string name="pref_update_station_images_title">Обновить изображения станций</string>
<string name="pref_test_notification_title">Тест уведомления</string>
<string name="pref_test_notification_summary">Проверить, работает ли система уведомлений.</string>
<!-- Sample Text -->
<!-- App Shortcuts -->
<string name="shortcut_last_station_disabled_message">Ярлык для воспроизведения последней станции отключён.</string>
+2
View File
@@ -86,6 +86,8 @@
<string name="pref_theme_selection_title">Тема застосунку</string>
<string name="pref_update_station_images_summary">Завантажити останню версію всіх зображень станцій.</string>
<string name="pref_update_station_images_title">Оновити зображення станцій</string>
<string name="pref_test_notification_title">Тестове сповіщення</string>
<string name="pref_test_notification_summary">Перевірити, чи працює система сповіщень.</string>
<!-- Sample Text -->
<!-- App Shortcuts -->
<string name="shortcut_last_station_disabled_message">Ярлик для відтворення останньої станції вимкнено.</string>
+2
View File
@@ -146,6 +146,8 @@
<string name="pref_theme_selection_title">App Theme</string>
<string name="pref_update_station_images_summary">Download latest version of all station images.</string>
<string name="pref_update_station_images_title">Update Station Images</string>
<string name="pref_test_notification_title">Test Notification</string>
<string name="pref_test_notification_summary">Test whether the notification system works.</string>
<!-- Sample Text -->
<string name="sample_text_sleep_timer_remaining_time" translatable="false">00:00</string>