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 eda4b100..86b3cdd3 100644 --- a/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt +++ b/app/src/main/java/io/heckel/ntfy/msg/NotificationService.kt @@ -90,6 +90,8 @@ class NotificationService(val context: Context) { .setSmallIcon(R.drawable.ic_notification) .setColor(Colors.notificationIcon(context)) .setContentTitle(title) + .setWhen(notification.timestamp * 1000) // Set timestamp (convert seconds to millis) + .setShowWhen(true) .setOnlyAlertOnce(true) // Do not vibrate or play sound if already showing (updates!) .setAutoCancel(true) // Cancel when notification is clicked setStyleAndText(builder, subscription, notification) // Preview picture or big text style diff --git a/fastlane/metadata/android/en-US/changelog/NEXT.txt b/fastlane/metadata/android/en-US/changelog/NEXT.txt index 8d80a23a..a52e5181 100644 --- a/fastlane/metadata/android/en-US/changelog/NEXT.txt +++ b/fastlane/metadata/android/en-US/changelog/NEXT.txt @@ -5,3 +5,4 @@ Features: Bug fixes + maintenance: * Fix crash when URL scheme is missing in default server (#1582, ntfy-android#158, thanks to @hard-zero1 for reporting) +* Fix notification timestamp to use original send time instead of receive time (#1112, thanks to @voruti for reporting) \ No newline at end of file