mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
refactor queryRequest
This commit is contained in:
@@ -600,7 +600,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
||||
}
|
||||
isFavoriteGroupLoading.value = true;
|
||||
processBulk({
|
||||
fn: favoriteRequest.getCachedFavoriteGroups,
|
||||
fn: (params) => favoriteRequest.getFavoriteGroups(params),
|
||||
N: -1,
|
||||
params: {
|
||||
n: 50,
|
||||
@@ -781,7 +781,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
||||
}
|
||||
let newFavoriteSortOrder = [];
|
||||
processBulk({
|
||||
fn: (params) => queryRequest.fetch('favorites', params),
|
||||
fn: (params) => favoriteRequest.getFavorites(params),
|
||||
N: -1,
|
||||
params: {
|
||||
n: 300,
|
||||
@@ -884,7 +884,7 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
||||
offset: 0,
|
||||
tag
|
||||
};
|
||||
const args = await queryRequest.fetch('favoriteAvatars', params);
|
||||
const args = await favoriteRequest.getFavoriteAvatars(params);
|
||||
handleFavoriteAvatarList(args);
|
||||
}
|
||||
|
||||
@@ -893,8 +893,8 @@ export const useFavoriteStore = defineStore('Favorite', () => {
|
||||
*/
|
||||
function refreshFavoriteItems() {
|
||||
const types = {
|
||||
world: [0, favoriteRequest.getCachedFavoriteWorlds],
|
||||
avatar: [0, favoriteRequest.getCachedFavoriteAvatars]
|
||||
world: [0, (params) => favoriteRequest.getFavoriteWorlds(params)],
|
||||
avatar: [0, (params) => favoriteRequest.getFavoriteAvatars(params)]
|
||||
};
|
||||
const tags = [];
|
||||
for (const ref of cachedFavorites.values()) {
|
||||
|
||||
Reference in New Issue
Block a user