refactor global search

This commit is contained in:
pa
2026-03-14 19:59:21 +09:00
parent 45f3eacf21
commit b750d3fb9a
20 changed files with 655 additions and 181 deletions

View File

@@ -5,6 +5,7 @@ import {
avatarRequest,
favoriteRequest
} from '../../../api';
import { removeAvatarFromCache } from '../../../coordinators/avatarCoordinator';
import {
copyToClipboard,
openExternalLink,
@@ -378,7 +379,7 @@ export function useAvatarDialogCommands(
.deleteAvatar({ avatarId: id })
.then((args) => {
const { json } = args;
cachedAvatars.delete(json._id);
removeAvatarFromCache(json._id);
if (userDialog.value.id === json.authorId) {
const map = new Map();
for (const ref of cachedAvatars.values()) {

View File

@@ -16,6 +16,7 @@ import {
readFileAsBase64,
withUploadTimeout
} from '../../../shared/utils/imageUpload';
import { removeWorldFromCache } from '../../../coordinators/worldCoordinator';
/**
* Composable for WorldDialog commands, prompt functions, and image upload.
@@ -534,7 +535,7 @@ export function useWorldDialogCommands(
handler: (id) => {
worldRequest.deleteWorld({ worldId: id }).then((args) => {
const { json } = args;
cachedWorlds.delete(json.id);
removeWorldFromCache(json.id);
if (worldDialog.value.ref.authorId === json.authorId) {
const map = new Map();
for (const ref of cachedWorlds.values()) {