From d3d802df12e7e1229735f2e563b52edbefb753f8 Mon Sep 17 00:00:00 2001 From: infi Date: Sun, 24 May 2026 22:51:27 +0200 Subject: [PATCH] feat: show notification dialogue outside of debug --- .../main/java/chat/stoat/screens/chat/ChatRouterScreen.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/chat/stoat/screens/chat/ChatRouterScreen.kt b/app/src/main/java/chat/stoat/screens/chat/ChatRouterScreen.kt index bc7b65e3..25191aef 100644 --- a/app/src/main/java/chat/stoat/screens/chat/ChatRouterScreen.kt +++ b/app/src/main/java/chat/stoat/screens/chat/ChatRouterScreen.kt @@ -186,8 +186,8 @@ class ChatRouterViewModel( val hasNotificationPermission = NotificationManagerCompat.from(context).areNotificationsEnabled() - // right now we only show this in debug builds so Chucker can show its notification - if (!hasNotificationPermission && BuildConfig.DEBUG) { + val rejectedPush = kvStorage.getBoolean("pushNotificationsRejected") == true + if (!hasNotificationPermission && !rejectedPush) { showNotificationRationale = true } } @@ -761,13 +761,13 @@ fun ChatRouterScreen( if (isGranted) { viewModel.setRegisterForNotifications() } else { - viewModel.showNotificationRationale = false + viewModel.markNotificationsRejected() } } if (viewModel.showNotificationRationale) { NotificationRationaleDialog( onDismiss = { - viewModel.showNotificationRationale = false + viewModel.markNotificationsRejected() }, onSelected = { accepted -> if (accepted) {