From 9058da08b08e9978a753a8e6434b01aed3e43303 Mon Sep 17 00:00:00 2001 From: Natsumi Date: Tue, 19 Jan 2021 02:23:50 +1300 Subject: [PATCH] Fix VRC+ Groups not caching avatar info --- html/src/app.js | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 19753115..bfa18011 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -2538,6 +2538,7 @@ speechSynthesis.getVoices(); 'world': [0, 'getFavoriteWorlds'], 'avatar': [0, 'getFavoriteAvatars'] }; + var tags = []; for (var ref of this.cachedFavorites.values()) { if (ref.$isDeleted) { continue; @@ -2546,19 +2547,37 @@ speechSynthesis.getVoices(); if (type === undefined) { continue; } + if ((ref.type === 'avatar') && (!tags.includes(ref.tags[0]))) { + tags.push(ref.tags[0]); + } ++type[0]; } for (var type in types) { var [N, fn] = types[type]; if (N > 0) { - this.bulk({ - fn, - N, + if (type === 'avatar') { + tags.forEach((tag) => { + this.bulk({ + fn, + N, + params: { + n: 100, + offset: 0, + tag: tag + } + }); + }); + } + else { + this.bulk({ + fn, + N, params: { n: 100, offset: 0 } - }); + }); + } } } };