mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Auto page relocation: ePUB support
This commit is contained in:
parent
da2ef5232b
commit
4dad8319d2
2 changed files with 11 additions and 1 deletions
11
reader.cpp
11
reader.cpp
|
@ -1402,6 +1402,9 @@ void reader::writeconfig_pagenumber(bool persistent) {
|
|||
}
|
||||
|
||||
void reader::quit_restart() {
|
||||
// Saving current page number
|
||||
saveReadingSettings();
|
||||
|
||||
// Cleaning bookconfig_mount mountpoint
|
||||
string_writeconfig("/opt/ibxd", "bookconfig_unmount\n");
|
||||
|
||||
|
@ -1437,6 +1440,13 @@ void reader::convertMuPdfVars() {
|
|||
mupdf::fontSize_qstr = QString::number(mupdf::fontSize);
|
||||
mupdf::width_qstr = QString::number(mupdf::width);
|
||||
mupdf::height_qstr = QString::number(mupdf::height);
|
||||
if(global::reader::globalReadingSettings == false) {
|
||||
if(goToSavedPageDone == false) {
|
||||
string_checkconfig_ro(".config/A-page_number/config");
|
||||
mupdf::epubPageNumber = checkconfig_str_val.toInt();
|
||||
goToSavedPageDone = true;
|
||||
}
|
||||
}
|
||||
if(mupdf::epubPageNumber <= 0) {
|
||||
mupdf::epubPageNumber = 1;
|
||||
}
|
||||
|
@ -1737,7 +1747,6 @@ void reader::showToast(QString messageToDisplay) {
|
|||
}
|
||||
|
||||
void reader::saveReadingSettings() {
|
||||
qDebug() << "Got there";
|
||||
writeconfig_pagenumber(true);
|
||||
}
|
||||
|
||||
|
|
1
reader.h
1
reader.h
|
@ -56,6 +56,7 @@ public:
|
|||
bool showTopbarWidget;
|
||||
bool wordwidgetLock;
|
||||
bool isNightModeActive;
|
||||
bool goToSavedPageDone;
|
||||
QString book_1;
|
||||
QString book_2;
|
||||
QString book_3;
|
||||
|
|
Loading…
Reference in a new issue