Skip to content

Commit

Permalink
fix: fix the cancel and delete bug
Browse files Browse the repository at this point in the history
  • Loading branch information
babuzeer committed Mar 18, 2024
1 parent a1666f0 commit cba5230
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/TodolistButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { currentUserEmail, currentnoticeid, isJoinedTodo } from "../store.js";
let showModal4 = false;
let showtodo = true;
function toggleModal4() {
showModal4 = !showModal4;
}
Expand All @@ -28,7 +28,8 @@
}
async function jumptodo(title) {
const response_ = await pb.collection("notices").getFullList({
if(showtodo == true){
const response_ = await pb.collection("notices").getFullList({
sort: "-created",
filter: `tittle="${title}"`,
});
Expand All @@ -49,10 +50,13 @@
}
}
push("/checknotice");
}
showtodo = true;
}
async function deletetodo(todoid) {
if (!confirm("确定要从待办事项中删除这则通知吗?")) {
showtodo = false;
return;
}
try {
Expand Down

0 comments on commit cba5230

Please sign in to comment.