From 778bc745643a770e09646f4f508cc337d955ef4f Mon Sep 17 00:00:00 2001 From: Janne Koschinski <janne@kuschku.de> Date: Thu, 3 May 2018 00:11:11 +0200 Subject: [PATCH] Set the timestamp of notifications correctly Signed-off-by: Janne Koschinski <janne@kuschku.de> --- .../service/QuasseldroidNotificationManager.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/de/kuschku/quasseldroid/service/QuasseldroidNotificationManager.kt b/app/src/main/java/de/kuschku/quasseldroid/service/QuasseldroidNotificationManager.kt index 407d3e594..0d7e52239 100644 --- a/app/src/main/java/de/kuschku/quasseldroid/service/QuasseldroidNotificationManager.kt +++ b/app/src/main/java/de/kuschku/quasseldroid/service/QuasseldroidNotificationManager.kt @@ -180,6 +180,7 @@ class QuasseldroidNotificationManager @Inject constructor(private val context: C replyPendingIntent ).addRemoteInput(remoteInput).build() ) + .setWhen(notifications.last().time.toEpochMilli()) .apply { if (bufferInfo.type.hasFlag(Buffer_Type.QueryBuffer)) { notifications.lastOrNull()?.avatar?.let { @@ -187,8 +188,7 @@ class QuasseldroidNotificationManager @Inject constructor(private val context: C } } } - return Handle(bufferInfo.bufferId, - notification) + return Handle(bufferInfo.bufferId, notification) } fun notificationBackground(): Handle { @@ -218,8 +218,7 @@ class QuasseldroidNotificationManager @Inject constructor(private val context: C .setSmallIcon(R.mipmap.ic_logo) .setColor(context.getColorCompat(R.color.colorPrimary)) .setPriority(NotificationCompat.PRIORITY_MIN) - return Handle(BACKGROUND_NOTIFICATION_ID, - notification) + return Handle(BACKGROUND_NOTIFICATION_ID, notification) } fun notify(handle: Handle) { -- GitLab