MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / onEnter

Method onEnter

src/activities/reader/XtcReaderActivity.cpp:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "fontIds.h"
26
27void XtcReaderActivity::onEnter() {
28 Activity::onEnter();
29
30 if (!xtc) {
31 return;
32 }
33
34 xtc->setupCacheDir();
35
36 // Load saved progress
37 loadProgress();
38
39 // Save current XTC as last opened book and add to recent books
40 APP_STATE.openEpubPath = xtc->getPath();
41 APP_STATE.saveToFile();
42 RECENT_BOOKS.addBook(xtc->getPath(), xtc->getTitle(), xtc->getAuthor(), xtc->getThumbBmpPath());
43
44 // Trigger first update
45 requestUpdate();
46}
47
48void XtcReaderActivity::onExit() {
49 Activity::onExit();

Callers

nothing calls this directly

Calls 6

addBookMethod · 0.80
setupCacheDirMethod · 0.45
saveToFileMethod · 0.45
getTitleMethod · 0.45
getAuthorMethod · 0.45
getThumbBmpPathMethod · 0.45

Tested by

no test coverage detected