🐛 修复特定情况下分类改变错误

This commit is contained in:
目棃
2024-04-04 14:48:46 +08:00
parent e5ff294080
commit 54e941504d
2 changed files with 7 additions and 2 deletions

View File

@@ -58,9 +58,10 @@ watchEffect(() => {
});
onMounted(() => {
const { date } = route.params;
let { date } = route.params;
let errLabel;
if (date) {
if (Array.isArray(date)) date = date[0];
renderItems.value = ArcBirDraw.filter((item) => item.birthday.toString() === date);
errLabel = `没有找到生日为 ${date} 的角色数据`;
canReset.value = true;

View File

@@ -346,7 +346,11 @@ async function updatePostsCollect(
if (postRes.length === 0) {
return false;
}
if (force) {
const unclassifiedSql = "SELECT * FROM UFMap where postId = ?";
const unclassifiedRes: TGApp.Sqlite.UserCollection.UFMap[] = await db.select(unclassifiedSql, [
postIds[i],
]);
if (force && unclassifiedRes.length > 0) {
const deleteCheck = await deletePostCollect(postIds[i]);
if (!deleteCheck) return false;
}