aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Heckel <pheckel@datto.com>2022-11-29 14:25:46 -0500
committerPhilipp Heckel <pheckel@datto.com>2022-11-29 14:25:46 -0500
commite18be4a2a79b3d16aefd5113d2df2274d683e60b (patch)
tree08629d4640f8a5d57d6e71937b2529c2336930b8
parentb3a0a10b605a7b49b2d7f4c51d1cec54050899fe (diff)
parent1b587ab82a4cf69e676788d8089a147d491163e7 (diff)
downloadponypush-e18be4a2a79b3d16aefd5113d2df2274d683e60b.tar.gz
ponypush-e18be4a2a79b3d16aefd5113d2df2274d683e60b.tar.bz2
ponypush-e18be4a2a79b3d16aefd5113d2df2274d683e60b.zip
Merge branch 'main' into constant-ring
-rw-r--r--app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt2
-rw-r--r--app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt1
-rw-r--r--fastlane/metadata/android/en-US/changelog/29.txt2
3 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt b/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt
index f49d426..a2adb41 100644
--- a/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt
+++ b/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt
@@ -364,7 +364,7 @@ class NotificationService(val context: Context) {
}
return TaskStackBuilder.create(context).run {
addNextIntentWithParentStack(intent) // Add the intent, which inflates the back stack
- getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) // Get the PendingIntent containing the entire back stack
+ getPendingIntent(Random().nextInt(), PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE) // Get the PendingIntent containing the entire back stack
}
}
diff --git a/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt b/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt
index 7d6355f..103ff1c 100644
--- a/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt
+++ b/app/src/main/java/io/heckel/ntfy/service/SubscriberService.kt
@@ -297,6 +297,7 @@ class SubscriberService : Service() {
.setContentIntent(pendingIntent)
.setSound(null)
.setShowWhen(false) // Don't show date/time
+ .setOngoing(true) // Starting SDK 33 / Android 13, foreground notifications can be swiped away
.setGroup(NOTIFICATION_GROUP_ID) // Do not group with other notifications
.build()
}
diff --git a/fastlane/metadata/android/en-US/changelog/29.txt b/fastlane/metadata/android/en-US/changelog/29.txt
index ef5587c..805d904 100644
--- a/fastlane/metadata/android/en-US/changelog/29.txt
+++ b/fastlane/metadata/android/en-US/changelog/29.txt
@@ -5,11 +5,13 @@ Bug fixes + maintenance:
* Upgrade Android dependencies and build toolchain to SDK 33 (no ticket)
* Simplify F-Droid build: Disable tasks for Google Services (#516, thanks to @markosopcic)
* Android 13: Ask for permission to post notifications (#508)
+* Android 13: Do not allow swiping away the foreground notification (#521, thanks to @alexhorner for reporting)
* Remove timestamp when copying message text (#471, thanks to @wunter8)
* Fix auto-delete if some icons do not exist anymore (#506)
* Fix notification icon color (#480, thanks to @s-h-a-r-d for reporting)
* Fix topics do not re-subscribe to Firebase after restoring from backup (#511)
* Fix crashes from large images (#474, thanks to @daedric7 for reporting)
+* Fix notification click opens wrong subscription (#261, thanks to @SMAW for reporting)
* Add donate button (no ticket)
Additional translations: