Explorar o código

Invert order of messages in notifications (#888)

Previously the latest message was on top. But that resulted in
weird situations when multi-line messages are part of the notification.

With this change, all new messages are appended to the notification, so
you can read them from top to bottom.
Danilo Bargen %!s(int64=6) %!d(string=hai) anos
pai
achega
6e6449a14c
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/services/notification.ts

+ 2 - 2
src/services/notification.ts

@@ -362,9 +362,9 @@ export class NotificationService {
             this.clearCache(tag);
         }
 
-        // If the cache is not empty, append old messages
+        // If the cache is not empty, prepend old messages
         if (this.notificationCache[tag]) {
-            body += '\n' + this.notificationCache[tag].body;
+            body = `${this.notificationCache[tag].body}\n${body}`;
         }
 
         // Show notification