mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-25 17:53:48 +02:00
refactor queryRequest
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
sanitizeEntityJson,
|
||||
storeAvatarImage
|
||||
} from '../shared/utils';
|
||||
import { avatarRequest, miscRequest } from '../api';
|
||||
import { avatarRequest, miscRequest, queryRequest } from '../api';
|
||||
import { AppDebug } from '../service/appConfig';
|
||||
import { database } from '../service/database';
|
||||
import { patchAvatarFromEvent } from '../queries';
|
||||
@@ -174,7 +174,7 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
}
|
||||
const loadAvatarRequest = forceRefresh
|
||||
? avatarRequest.getAvatar({ avatarId })
|
||||
: avatarRequest.getCachedAvatar({ avatarId });
|
||||
: queryRequest.fetch('avatar', { avatarId });
|
||||
loadAvatarRequest
|
||||
.then((args) => {
|
||||
const ref = applyAvatar(args.json);
|
||||
@@ -312,6 +312,9 @@ export const useAvatarStore = defineStore('Avatar', () => {
|
||||
return ref;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function resetCachedAvatarModerations() {
|
||||
cachedAvatarModerations.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user