Skip to content

Commit

Permalink
Merge pull request #45 from lanyeeee/feature/refresh
Browse files Browse the repository at this point in the history
feat: 实现章节详情刷新按钮的功能
  • Loading branch information
lanyeeee authored Oct 30, 2024
2 parents e3b8e45 + 62af91f commit d339ade
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/ChapterPane.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,16 @@ async function downloadChapters() {
}
}
// TODO: 实现刷新按钮的功能
async function refreshChapters() {
if (selectedAlbum.value === undefined) {
return;
}
const result = await commands.getAlbum(selectedAlbum.value.id);
if (result.status === "error") {
console.error(result.error);
return;
}
selectedAlbum.value = result.data;
}
</script>
Expand Down

0 comments on commit d339ade

Please sign in to comment.