Search by userNotes, notes in playerList and friendsList

This commit is contained in:
Natsumi
2025-06-09 09:07:52 +12:00
parent 98c3e43561
commit 5b7da6a91f
8 changed files with 209 additions and 15 deletions

View File

@@ -154,6 +154,8 @@ import _groups from './classes/groups.js';
import _vrcRegistry from './classes/vrcRegistry.js';
import _restoreFriendOrder from './classes/restoreFriendOrder.js';
import { userNotes } from './classes/userNotes.js';
import pugTemplate from './app.pug';
// API classes
@@ -721,16 +723,16 @@ console.log(`isLinux: ${LINUX}`);
API.applyUser = function (json) {
var ref = this.cachedUsers.get(json.id);
if (typeof json.statusDescription !== 'undefined') {
if (json.statusDescription) {
json.statusDescription = $utils.replaceBioSymbols(
json.statusDescription
);
json.statusDescription = $app.removeEmojis(json.statusDescription);
}
if (typeof json.bio !== 'undefined') {
if (json.bio) {
json.bio = $utils.replaceBioSymbols(json.bio);
}
if (typeof json.note !== 'undefined') {
if (json.note) {
json.note = $utils.replaceBioSymbols(json.note);
}
if (json.currentAvatarImageUrl === $app.robotUrl) {
@@ -762,7 +764,7 @@ console.log(`isLinux: ${LINUX}`);
last_platform: '',
location: '',
platform: '',
note: '',
note: null, // keep as null, to detect deleted notes
profilePicOverride: '',
profilePicOverrideThumbnail: '',
pronouns: '',
@@ -907,6 +909,9 @@ console.log(`isLinux: ${LINUX}`);
props[prop] = [tobe, asis];
}
}
if ($ref.note !== null && $ref.note !== ref.note) {
userNotes.checkNote(ref.id, ref.note);
}
// FIXME
// if the status is offline, just ignore status and statusDescription only.
if (has && ref.status !== 'offline' && $ref.status !== 'offline') {
@@ -4238,6 +4243,7 @@ console.log(`isLinux: ${LINUX}`);
}
await $app.getAvatarHistory();
await $app.getAllUserMemos();
userNotes.init();
if ($app.randomUserColours) {
$app.getNameColour(this.currentUser.id).then((colour) => {
this.currentUser.$userColour = colour;
@@ -6271,7 +6277,7 @@ console.log(`isLinux: ${LINUX}`);
);
$app.data.hideUserMemos = await configRepository.getBool(
'VRCX_hideUserMemos',
false
true
);
$app.data.hideUnfriends = await configRepository.getBool(
'VRCX_hideUnfriends',