Phase 5 - card based layout
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include "RecentBooksStore.h"
|
||||
#include "SdCardFontGlobals.h"
|
||||
#include "StarredPagesActivity.h"
|
||||
#include "activities/settings/ReadingStatsBookDetailActivity.h"
|
||||
#include "components/UITheme.h"
|
||||
#include "fontIds.h"
|
||||
#include "util/ScreenshotUtil.h"
|
||||
@@ -723,6 +724,18 @@ void EpubReaderActivity::onReaderMenuConfirm(EpubReaderMenuActivity::MenuAction
|
||||
onGoHome();
|
||||
return;
|
||||
}
|
||||
case EpubReaderMenuActivity::MenuAction::READING_STATS: {
|
||||
// Jump to this book's detail screen using the same filename-hash docId
|
||||
// the session was opened with. The in-flight session's time isn't
|
||||
// visible here — it lands in the store only when end() runs on reader
|
||||
// exit. For a brand-new book that's never been finished a session yet
|
||||
// the screen will show "no data"; that's accurate.
|
||||
if (!epub) break;
|
||||
startActivityForResult(std::make_unique<ReadingStatsBookDetailActivity>(
|
||||
renderer, mappedInput, KOReaderDocumentId::calculateFromFilename(epub->getPath())),
|
||||
[this](const ActivityResult&) { requestUpdate(); });
|
||||
break;
|
||||
}
|
||||
case EpubReaderMenuActivity::MenuAction::MARK_AS_READ: {
|
||||
if (!epub) {
|
||||
break;
|
||||
|
||||
@@ -252,6 +252,8 @@ void EpubReaderMenuActivity::buildMenuItems(bool hasFootnotes, bool hasStarredPa
|
||||
|
||||
// --- Tools ---
|
||||
menuItems.push_back(SettingInfo::Separator(StrId::STR_READER_TOOLS));
|
||||
menuItems.push_back(SettingInfo::Action(StrId::STR_READING_STATS_FOR_THIS_BOOK, SettingAction::None)
|
||||
.withSubmenu(StrId::STR_READER_TOOLS));
|
||||
menuItems.push_back(
|
||||
SettingInfo::Action(StrId::STR_MARK_AS_READ, SettingAction::None).withSubmenu(StrId::STR_READER_TOOLS));
|
||||
menuItems.push_back(
|
||||
@@ -307,6 +309,8 @@ EpubReaderMenuActivity::MenuAction EpubReaderMenuActivity::actionForNameId(StrId
|
||||
return MenuAction::RENDER_BENCHMARK;
|
||||
case StrId::STR_GO_HOME_BUTTON:
|
||||
return MenuAction::GO_HOME;
|
||||
case StrId::STR_READING_STATS_FOR_THIS_BOOK:
|
||||
return MenuAction::READING_STATS;
|
||||
default:
|
||||
return MenuAction::NONE;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ class EpubReaderMenuActivity final : public MenuListActivity {
|
||||
STAR_PAGE,
|
||||
MARK_AS_READ,
|
||||
DELETE_CACHE,
|
||||
RENDER_BENCHMARK
|
||||
RENDER_BENCHMARK,
|
||||
READING_STATS,
|
||||
};
|
||||
|
||||
explicit EpubReaderMenuActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, const std::string& title,
|
||||
|
||||
Reference in New Issue
Block a user