fix: add txt books to recent tab (#526)
Cherry-picked from upstream PR #526 Resolved conflict: kept local cover generation code
This commit is contained in:
parent
31199f9dd1
commit
d8b8c5bad9
@ -11,6 +11,7 @@
|
|||||||
#include "CrossPointSettings.h"
|
#include "CrossPointSettings.h"
|
||||||
#include "CrossPointState.h"
|
#include "CrossPointState.h"
|
||||||
#include "MappedInputManager.h"
|
#include "MappedInputManager.h"
|
||||||
|
#include "RecentBooksStore.h"
|
||||||
#include "ScreenComponents.h"
|
#include "ScreenComponents.h"
|
||||||
#include "fontIds.h"
|
#include "fontIds.h"
|
||||||
|
|
||||||
@ -103,11 +104,12 @@ void TxtReaderActivity::onEnter() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save current txt as last opened file and cache title for home screen
|
// Save current txt as last opened file and add to recent books
|
||||||
APP_STATE.openEpubPath = txt->getPath();
|
APP_STATE.openEpubPath = txt->getPath();
|
||||||
APP_STATE.openBookTitle = txt->getTitle();
|
APP_STATE.openBookTitle = txt->getTitle();
|
||||||
APP_STATE.openBookAuthor.clear(); // TXT files don't have author metadata
|
APP_STATE.openBookAuthor.clear(); // TXT files don't have author metadata
|
||||||
APP_STATE.saveToFile();
|
APP_STATE.saveToFile();
|
||||||
|
RECENT_BOOKS.addBook(txt->getPath());
|
||||||
|
|
||||||
// Trigger first update
|
// Trigger first update
|
||||||
updateRequired = true;
|
updateRequired = true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user