Эх сурвалжийг харах

Clean up message timestamp even further

Signed-off-by: Mario Danic <mario@lovelyhq.com>
Mario Danic 5 жил өмнө
parent
commit
8d73c89f69

+ 2 - 2
app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.java

@@ -288,8 +288,7 @@ public class NotificationWorker extends Worker {
                 .setCategory(category)
                 .setCategory(category)
                 .setPriority(priority)
                 .setPriority(priority)
                 .setSubText(baseUrl)
                 .setSubText(baseUrl)
-                .setWhen(decryptedPushMessage.getTimestamp() != 0 ?
-                        decryptedPushMessage.getTimestamp() : System.currentTimeMillis())
+                .setWhen(decryptedPushMessage.getTimestamp())
                 .setShowWhen(true)
                 .setShowWhen(true)
                 .setContentTitle(decryptedPushMessage.getSubject())
                 .setContentTitle(decryptedPushMessage.getSubject())
                 .setContentIntent(pendingIntent)
                 .setContentIntent(pendingIntent)
@@ -525,6 +524,7 @@ public class NotificationWorker extends Worker {
                     decryptedPushMessage = LoganSquare.parse(new String(decryptedSubject),
                     decryptedPushMessage = LoganSquare.parse(new String(decryptedSubject),
                             DecryptedPushMessage.class);
                             DecryptedPushMessage.class);
 
 
+                    decryptedPushMessage.setTimestamp(System.currentTimeMillis());
                     if (decryptedPushMessage.isDelete()) {
                     if (decryptedPushMessage.isDelete()) {
                         NotificationUtils.cancelExistingNotificationWithId(context, signatureVerification.getUserEntity(), decryptedPushMessage.getNotificationId());
                         NotificationUtils.cancelExistingNotificationWithId(context, signatureVerification.getUserEntity(), decryptedPushMessage.getNotificationId());
                     } else if (decryptedPushMessage.isDeleteAll()) {
                     } else if (decryptedPushMessage.isDeleteAll()) {