refactor: Removed SdCardFontGlobals.h (#1962)
## Summary First of several changes to decouple and clean up SD card fonts integration. This change eliminates SdCardFontGlobals.h: - Simply declare the `extern SdCardFontSystem sdFontSystem` in SdCardFontSystem.h. - `ActivityManager::goToReader` should not care about loading SD card fonts. Instead do the same work in `ReaderActivity::onEnter`, after the previous activity has exited and after ReaderActivity has validated the file path. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "CrossPointSettings.h"
|
||||
#include "Epub.h"
|
||||
#include "EpubReaderActivity.h"
|
||||
#include "SdCardFontSystem.h"
|
||||
#include "Txt.h"
|
||||
#include "TxtReaderActivity.h"
|
||||
#include "Xtc.h"
|
||||
@@ -103,6 +104,8 @@ void ReaderActivity::onEnter() {
|
||||
return;
|
||||
}
|
||||
|
||||
sdFontSystem.ensureLoaded(renderer);
|
||||
|
||||
currentBookPath = initialBookPath;
|
||||
if (isBmpFile(initialBookPath)) {
|
||||
onGoToBmpViewer(initialBookPath);
|
||||
|
||||
Reference in New Issue
Block a user