diff --git a/src/app.js b/src/app.js index 28c774a2..589d878e 100644 --- a/src/app.js +++ b/src/app.js @@ -2001,6 +2001,14 @@ console.log(`isLinux: ${LINUX}`); API.$on('LOGIN', function () { $app.localFavoriteFriends.clear(); $app.currentUserGroupsInit = false; + this.cachedGroups.clear(); + this.cachedAvatars.clear(); + this.cachedWorlds.clear(); + this.cachedUsers.clear(); + this.cachedInstances.clear(); + this.cachedAvatarNames.clear(); + this.cachedAvatarModerations.clear(); + this.cachedPlayerModerations.clear(); this.cachedFavorites.clear(); this.cachedFavoritesByObjectId.clear(); this.cachedFavoriteGroups.clear(); @@ -5682,6 +5690,9 @@ console.log(`isLinux: ${LINUX}`); if (ctx.friendNumber) { ref.$friendNumber = ctx.friendNumber; } + if (!ref.$friendNumber) { + ref.$friendNumber = 0; // no null + } if (ctx.displayName !== ref.displayName) { if (ctx.displayName) { var friendLogHistoryDisplayName = { diff --git a/src/classes/userNotes.js b/src/classes/userNotes.js index 2bfbe287..1c252996 100644 --- a/src/classes/userNotes.js +++ b/src/classes/userNotes.js @@ -9,9 +9,10 @@ const userNotes = { notes: new Map(), async init() { + this.lastNoteCheck = new Date(); + this.lastDbNoteDate = null; + this.notes.clear(); try { - this.lastNoteCheck = new Date(); - this.notes.clear(); // todo: get users from store const users = window.API.cachedUsers; const dbNotes = await database.getAllUserNotes(); @@ -93,7 +94,6 @@ const userNotes = { }, async checkNote(userId, newNote) { - console.log('checkNote', userId, newNote); // last check was more than than 5 minutes ago if ( !this.lastNoteCheck || diff --git a/src/mixins/dialogs/dialogs.pug b/src/mixins/dialogs/dialogs.pug index b1b18ff5..f0376524 100644 --- a/src/mixins/dialogs/dialogs.pug +++ b/src/mixins/dialogs/dialogs.pug @@ -142,6 +142,10 @@ mixin dialogs :groupDialogFilterOptions='groupDialogFilterOptions' :isGroupGalleryLoading='isGroupGalleryLoading' :randomUserColours='randomUserColours' + :offlineFriends='offlineFriends' + :activeFriends='activeFriends' + :onlineFriends='onlineFriends' + :vipFriends='vipFriends' @updateGroupPostSearch='updateGroupPostSearch' @groupDialogCommand='groupDialogCommand' @getGroupDialogGroup='getGroupDialogGroup')