Browse Source

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 6 years ago
parent
commit
6e6449a14c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/services/notification.ts

+ 2 - 2
src/services/notification.ts

@@ -362,9 +362,9 @@ export class NotificationService {
             this.clearCache(tag);
             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]) {
         if (this.notificationCache[tag]) {
-            body += '\n' + this.notificationCache[tag].body;
+            body = `${this.notificationCache[tag].body}\n${body}`;
         }
         }
 
 
         // Show notification
         // Show notification