From 9e891c34425ae777436439ef1d7bebc7823916ac Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 27 Aug 2020 10:48:12 +0200 Subject: [PATCH] log actual timestamps as well so we can see if they are anything but null or a number --- src/domain/session/roomlist/RoomTileViewModel.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/domain/session/roomlist/RoomTileViewModel.js b/src/domain/session/roomlist/RoomTileViewModel.js index 5a73a86a..00c6df9d 100644 --- a/src/domain/session/roomlist/RoomTileViewModel.js +++ b/src/domain/session/roomlist/RoomTileViewModel.js @@ -59,7 +59,7 @@ export class RoomTileViewModel extends ViewModel { let buf = ""; function log(...args) { - buf = buf + args.join(" ") + "\n"; + buf = buf + args.map(a => a+"").join(" ") + "\n"; } function logResult(result) { if (result === 0) { @@ -86,7 +86,7 @@ export class RoomTileViewModel extends ViewModel { const theirTimestampValid = Number.isSafeInteger(theirTimestamp); // if either does not have a timestamp, put the one with a timestamp first if (myTimestampValid !== theirTimestampValid) { - log("checking if either does not have lastMessageTimestamp ..."); + log("checking if either does not have lastMessageTimestamp ...", myTimestamp, theirTimestamp); if (theirTimestamp === null) { return logResult(-1); } @@ -94,7 +94,7 @@ export class RoomTileViewModel extends ViewModel { } const timeDiff = theirTimestamp - myTimestamp; if (timeDiff === 0 || !theirTimestampValid || !myTimestampValid) { - log("checking name ..."); + log("checking name ...", myTimestamp, theirTimestamp); // sort alphabetically const nameCmp = this.name.localeCompare(other.name); if (nameCmp === 0) {