refactor: unify book cache clearing for epub, txt, and xtc files (#1875)

This commit is contained in:
WuTofu
2026-05-21 14:44:10 +03:00
committed by GitHub
parent dc404b41c7
commit 2dd491b62e
9 changed files with 77 additions and 32 deletions
@@ -1,6 +1,5 @@
#include "OpdsBookBrowserActivity.h"
#include <Epub.h>
#include <GfxRenderer.h>
#include <I18n.h>
#include <Logging.h>
@@ -14,6 +13,7 @@
#include "components/UITheme.h"
#include "fontIds.h"
#include "network/HttpDownloader.h"
#include "util/BookCacheUtils.h"
#include "util/StringUtils.h"
#include "util/UrlUtils.h"
@@ -283,7 +283,7 @@ void OpdsBookBrowserActivity::downloadBook(const OpdsEntry& book) {
nullptr, server.username, server.password);
if (result == HttpDownloader::OK) {
Epub(filename, "/.crosspoint").clearCache();
clearBookCache(filename);
state = BrowserState::BROWSING;
} else {
state = BrowserState::ERROR;