This commit is contained in:
Leonabcd123 2026-01-09 22:12:43 +02:00 committed by GitHub
commit 744f101665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View file

@ -875,6 +875,15 @@ export async function saveLocalTagPB<M extends Mode>(
return;
}
export async function updateTagAfterDelete(tagId: string): Promise<void> {
getSnapshot()?.results?.forEach((result) => {
const tagIndex = result.tags.indexOf(tagId);
if (tagIndex > -1) {
result.tags.splice(tagIndex, 1);
}
});
}
export async function updateLbMemory<M extends Mode>(
mode: M,
mode2: Mode2<M>,

View file

@ -126,6 +126,8 @@ const actionModals: Record<Action, SimpleModal> = {
}
});
void Settings.update();
await DB.updateTagAfterDelete(tagId);
return { status: 1, message: `Tag removed` };
},
}),