Add and refactor LyraCarouselTheme by zgredex

This commit is contained in:
jpirnay
2026-05-08 09:36:12 +02:00
parent 4005bf55e5
commit 8a92edcea5
11 changed files with 325 additions and 200 deletions
@@ -241,6 +241,7 @@ void EpubReaderActivity::onExit() {
APP_STATE.readerActivityLoadCount = 0;
APP_STATE.saveToFile();
section.reset();
UITheme::getInstance().getMutableTheme().onBookWillClose(epub ? epub->getPath() : "", epub.get(), nullptr, nullptr);
epub.reset();
currentPageFootnotes.clear();
currentPageFootnotes.shrink_to_fit();
@@ -219,6 +219,7 @@ void MdReaderActivity::onExit() {
currentPageLines.clear();
APP_STATE.readerActivityLoadCount = 0;
APP_STATE.saveToFile();
UITheme::getInstance().getMutableTheme().onBookWillClose(txt ? txt->getPath() : "", nullptr, nullptr, txt.get());
txt.reset();
}
@@ -134,6 +134,7 @@ void TxtReaderActivity::onExit() {
currentPageLines.clear();
APP_STATE.readerActivityLoadCount = 0;
APP_STATE.saveToFile();
UITheme::getInstance().getMutableTheme().onBookWillClose(txt ? txt->getPath() : "", nullptr, nullptr, txt.get());
txt.reset();
}
@@ -20,6 +20,7 @@
#include "ReaderUtils.h"
#include "RecentBooksStore.h"
#include "XtcReaderChapterSelectionActivity.h"
#include "components/UITheme.h"
#include "fontIds.h"
void XtcReaderActivity::onEnter() {
@@ -52,6 +53,8 @@ void XtcReaderActivity::onExit() {
APP_STATE.readerActivityLoadCount = 0;
APP_STATE.saveToFile();
UITheme::getInstance().getMutableTheme().onBookWillClose(xtc ? xtc->getPath() : "", nullptr, xtc.get(), nullptr);
xtc.reset();
}