diff --git a/html/src/app.js b/html/src/app.js
index fccbc83b..6f561db1 100644
--- a/html/src/app.js
+++ b/html/src/app.js
@@ -7280,10 +7280,13 @@ speechSynthesis.getVoices();
$app.methods.getMemo = async function (userId) {
try {
- var row = await database.getMemo(userId);
- return row.memo;
+ return await database.getMemo(userId);
} catch (err) {}
- return '';
+ return {
+ userId: '',
+ editedAt: '',
+ memo: ''
+ };
};
$app.methods.saveMemo = function (id, memo) {
@@ -7531,11 +7534,13 @@ speechSynthesis.getVoices();
};
if (this.friendLogInitStatus) {
this.getMemo(id).then((memo) => {
- ctx.memo = memo;
- ctx.$nickName = '';
- if (memo) {
- var array = memo.split('\n');
- ctx.$nickName = array[0];
+ if (memo.userId === id) {
+ ctx.memo = memo.memo;
+ ctx.$nickName = '';
+ if (memo.memo) {
+ var array = memo.memo.split('\n');
+ ctx.$nickName = array[0];
+ }
}
});
}
@@ -14764,7 +14769,13 @@ speechSynthesis.getVoices();
unFriended: false
};
+ $app.data.ignoreUserMemoSave = false;
+
$app.watch['userDialog.memo'] = function () {
+ if (this.ignoreUserMemoSave) {
+ this.ignoreUserMemoSave = false;
+ return;
+ }
var D = this.userDialog;
this.saveMemo(D.id, D.memo);
};
@@ -14959,19 +14970,23 @@ speechSynthesis.getVoices();
var D = this.userDialog;
D.id = userId;
D.treeData = [];
+ this.ignoreUserMemoSave = true;
D.memo = '';
D.note = '';
D.noteSaving = false;
this.getMemo(userId).then((memo) => {
- D.memo = memo;
- var ref = this.friends.get(userId);
- if (ref) {
- ref.memo = String(memo || '');
- if (memo) {
- var array = memo.split('\n');
- ref.$nickName = array[0];
- } else {
- ref.$nickName = '';
+ if (memo.userId === userId) {
+ this.ignoreUserMemoSave = true;
+ D.memo = memo.memo;
+ var ref = this.friends.get(userId);
+ if (ref) {
+ ref.memo = String(memo.memo || '');
+ if (memo.memo) {
+ var array = memo.memo.split('\n');
+ ref.$nickName = array[0];
+ } else {
+ ref.$nickName = '';
+ }
}
}
});
diff --git a/html/src/index.pug b/html/src/index.pug
index a8a2bde1..b9fad337 100644
--- a/html/src/index.pug
+++ b/html/src/index.pug
@@ -1525,6 +1525,8 @@ html
span.name {{ $t('view.settings.advanced.advanced.cache_debug.world_cache') }} #[span(v-text="API.cachedWorlds.size")]
div.options-container-item
span.name {{ $t('view.settings.advanced.advanced.cache_debug.avatar_cache') }} #[span(v-text="API.cachedAvatars.size")]
+ div.options-container-item
+ span.name {{ $t('view.settings.advanced.advanced.cache_debug.group_cache') }} #[span(v-text="API.cachedGroups.size")]
div.options-container-item
span.name {{ $t('view.settings.advanced.advanced.cache_debug.avatar_name_cache') }} #[span(v-text="API.cachedAvatarNames.size")]
div.options-container-item
diff --git a/html/src/localization/strings/en.json b/html/src/localization/strings/en.json
index e67ccfa7..0263533c 100644
--- a/html/src/localization/strings/en.json
+++ b/html/src/localization/strings/en.json
@@ -406,6 +406,7 @@
"user_cache": "User cache:",
"world_cache": "World cache:",
"avatar_cache": "Avatar cache:",
+ "group_cache": "Group cache:",
"avatar_name_cache": "Avatar Name cache:",
"clear_cache": "Clear Cache",
"auto_clear_cache": "Auto Clear Cache",