refactor: Drop FsFile alias, use HalFile in downstream code (#2141)
This commit is contained in:
@@ -415,7 +415,7 @@ void TxtReaderActivity::renderStatusBar() const {
|
||||
}
|
||||
|
||||
void TxtReaderActivity::saveProgress() const {
|
||||
FsFile f;
|
||||
HalFile f;
|
||||
if (Storage.openFileForWrite("TRS", txt->getCachePath() + "/progress.bin", f)) {
|
||||
uint8_t data[4];
|
||||
data[0] = currentPage & 0xFF;
|
||||
@@ -427,7 +427,7 @@ void TxtReaderActivity::saveProgress() const {
|
||||
}
|
||||
|
||||
void TxtReaderActivity::loadProgress() {
|
||||
FsFile f;
|
||||
HalFile f;
|
||||
if (Storage.openFileForRead("TRS", txt->getCachePath() + "/progress.bin", f)) {
|
||||
uint8_t data[4];
|
||||
if (f.read(data, 4) == 4) {
|
||||
@@ -457,7 +457,7 @@ bool TxtReaderActivity::loadPageIndexCache() {
|
||||
// - N * uint32_t: page offsets
|
||||
|
||||
std::string cachePath = txt->getCachePath() + "/index.bin";
|
||||
FsFile f;
|
||||
HalFile f;
|
||||
if (!Storage.openFileForRead("TRS", cachePath, f)) {
|
||||
LOG_DBG("TRS", "No page index cache found");
|
||||
return false;
|
||||
@@ -540,7 +540,7 @@ bool TxtReaderActivity::loadPageIndexCache() {
|
||||
|
||||
void TxtReaderActivity::savePageIndexCache() const {
|
||||
std::string cachePath = txt->getCachePath() + "/index.bin";
|
||||
FsFile f;
|
||||
HalFile f;
|
||||
if (!Storage.openFileForWrite("TRS", cachePath, f)) {
|
||||
LOG_ERR("TRS", "Failed to save page index cache");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user