Attempt at closing reader and sync
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <HalClock.h>
|
||||
#include <HalPowerManager.h>
|
||||
|
||||
#include "CrossPointState.h"
|
||||
#include "boot_sleep/BootActivity.h"
|
||||
#include "boot_sleep/SleepActivity.h"
|
||||
#include "browser/OpdsBookBrowserActivity.h"
|
||||
@@ -11,6 +12,7 @@
|
||||
#include "home/HomeActivity.h"
|
||||
#include "home/RecentBooksActivity.h"
|
||||
#include "network/CrossPointWebServerActivity.h"
|
||||
#include "reader/KOReaderSyncActivity.h"
|
||||
#include "reader/ReaderActivity.h"
|
||||
#include "settings/SettingsActivity.h"
|
||||
#include "util/FullScreenMessageActivity.h"
|
||||
@@ -227,6 +229,19 @@ void ActivityManager::goToReader(std::string path) {
|
||||
replaceActivity(std::make_unique<ReaderActivity>(renderer, mappedInput, std::move(path)));
|
||||
}
|
||||
|
||||
void ActivityManager::goToKOReaderSync() {
|
||||
const auto& sync = APP_STATE.koReaderSyncSession;
|
||||
if (!sync.active || sync.epubPath.empty()) {
|
||||
LOG_ERR("ACT", "Cannot launch KOReader sync without an active EPUB handoff");
|
||||
goHome();
|
||||
return;
|
||||
}
|
||||
|
||||
replaceActivity(std::make_unique<KOReaderSyncActivity>(renderer, mappedInput, sync.epubPath, sync.spineIndex,
|
||||
sync.page, sync.totalPagesInSpine, sync.paragraphIndex,
|
||||
sync.hasParagraphIndex, sync.intent));
|
||||
}
|
||||
|
||||
void ActivityManager::pushReader(std::string path) {
|
||||
pushActivity(std::make_unique<ReaderActivity>(renderer, mappedInput, std::move(path)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user