add isFriendLogLoaded flag to Friend store

This commit is contained in:
pa
2026-01-29 16:59:34 +09:00
parent 1d4026a89c
commit 48d84363ec
3 changed files with 10 additions and 3 deletions

View File

@@ -903,7 +903,7 @@ export const useUserStore = defineStore('User', () => {
if (userId !== currentUser.value.id) {
database
.getUserStats(D.ref, inCurrentWorld)
.then((ref1) => {
.then(async (ref1) => {
if (ref1.userId === D.id) {
D.lastSeen = ref1.lastSeen;
D.joinCount = ref1.joinCount;
@@ -911,6 +911,9 @@ export const useUserStore = defineStore('User', () => {
}
const displayNameMap =
ref1.previousDisplayNames;
if (!friendStore.isFriendLogLoaded) {
await friendStore.initFriendLogHistoryTable();
}
friendStore.friendLogTable.data.forEach(
(ref2) => {
if (ref2.userId === D.id) {