improve performance and clean up

This commit is contained in:
pa
2026-03-15 20:52:01 +09:00
parent af389e645d
commit 91c056b5a3
7 changed files with 132 additions and 256 deletions
+8 -5
View File
@@ -134,9 +134,7 @@
useAppearanceSettingsStore,
useFriendStore,
useModalStore,
useSearchStore,
useUserStore,
useVrcxStore
useSearchStore
} from '../../stores';
import { friendRequest, userRequest } from '../../api';
import { DataTableLayout } from '../../components/ui/data-table';
@@ -261,6 +259,7 @@
watch(
() => route.path,
() => {
refreshFriendStats();
nextTick(() => friendsListSearchChange());
},
{ immediate: true }
@@ -269,10 +268,16 @@
watch(
() => friends.value.size,
() => {
refreshFriendStats();
friendsListSearchChange();
}
);
function refreshFriendStats() {
getAllUserStats();
getAllUserMutualCount();
}
/**
*
*/
@@ -319,8 +324,6 @@
results.push(ctx.ref);
}
friendsListDisplayData.value = results;
getAllUserStats();
getAllUserMutualCount();
table.setPageIndex(0);
table.setSorting([...defaultSorting]);
sorting.value = [...defaultSorting];