mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 22:36:05 +02:00
Mutual friends on friendsList
This commit is contained in:
@@ -915,6 +915,16 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
}
|
||||
}
|
||||
|
||||
async function getAllUserMutualCount() {
|
||||
const mutualCountMap = await database.getMutualCountForAllUsers();
|
||||
for (const [userId, mutualCount] of mutualCountMap.entries()) {
|
||||
const ref = friends.get(userId);
|
||||
if (ref?.ref) {
|
||||
ref.ref.$mutualCount = mutualCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} id
|
||||
@@ -1625,6 +1635,7 @@ export const useFriendStore = defineStore('Friend', () => {
|
||||
refreshFriendsList,
|
||||
updateOnlineFriendCounter,
|
||||
getAllUserStats,
|
||||
getAllUserMutualCount,
|
||||
initFriendLog,
|
||||
migrateFriendLog,
|
||||
getFriendLog,
|
||||
|
||||
@@ -523,6 +523,7 @@ export const useUserStore = defineStore('User', () => {
|
||||
$joinCount: 0,
|
||||
$timeSpent: 0,
|
||||
$lastSeen: '',
|
||||
$mutualCount: 0,
|
||||
$nickName: '',
|
||||
$previousLocation: '',
|
||||
$customTag: '',
|
||||
|
||||
Reference in New Issue
Block a user