Skip to content

Commit

Permalink
🐛 修复切换隐藏已完成逻辑错误
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 20, 2024
1 parent 1dc5aa0 commit 4e3ad58
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/userAchi/tua-achi-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const showNc = ref<boolean>(false);
const showOverlay = ref<boolean>(false);
const renderAchi = computed<Array<TGApp.Sqlite.Achievement.RenderAchi>>(() => {
if (props.hideFin) return achievements.value.filter((a) => a.isCompleted);
if (props.hideFin) return achievements.value.filter((a) => !a.isCompleted);
return achievements.value;
});
Expand Down
5 changes: 0 additions & 5 deletions src/pages/common/Achievements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@ let achiListener: UnlistenFn | null = null;
async function switchHideFin() {
const text = hideFin.value ? "显示已完成" : "隐藏已完成";
const res = await showConfirm({ title: "是否切换显示已完成?", text });
if (!res) {
showSnackbar({ color: "cancel", text: "已取消切换" });
return;
}
hideFin.value = !hideFin.value;
showSnackbar({ text: `已${text}`, color: "success" });
}
Expand Down

0 comments on commit 4e3ad58

Please sign in to comment.