fix: avoid additional click after books is downloaded before opening (#1346)

This commit is contained in:
Huang Xin
2025-06-05 17:43:46 +08:00
committed by GitHub
parent 00deca5029
commit eee4cbeaca
@@ -114,6 +114,9 @@ const BookshelfItem: React.FC<BookshelfItemProps> = ({
const makeBookAvailable = async (book: Book) => {
if (book.uploadedAt && !book.downloadedAt) {
if (await appService?.isBookAvailable(book)) {
return true;
}
let available = false;
const loadingTimeout = setTimeout(() => setLoading(true), 200);
try {