sync: check local file availability before opening (#262)

This commit is contained in:
Huang Xin
2025-01-28 21:02:19 +01:00
committed by GitHub
parent 171a7ee759
commit c0d715bf77
6 changed files with 84 additions and 51 deletions
@@ -59,7 +59,9 @@ const ReaderContent: React.FC<{ ids?: string; settings: SystemSettings }> = ({ i
const isPrimary = !uniqueIds.has(id);
uniqueIds.add(id);
if (!getViewState(key)) {
initViewState(envConfig, id, key, isPrimary);
initViewState(envConfig, id, key, isPrimary).catch((error) => {
console.log('Error initializing book', key, error);
});
if (index === 0) setSideBarBookKey(key);
}
});