regular menu action if no koreader credentials are defined
This commit is contained in:
@@ -135,10 +135,10 @@ void EpubReaderActivity::loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Long press CONFIRM (1s+) goes directly to KOReader sync.
|
// Long press CONFIRM (1s+) goes directly to KOReader sync when credentials are configured.
|
||||||
|
// Without credentials, fall through to the regular menu on release.
|
||||||
if (mappedInput.isPressed(MappedInputManager::Button::Confirm) &&
|
if (mappedInput.isPressed(MappedInputManager::Button::Confirm) &&
|
||||||
mappedInput.getHeldTime() >= ReaderUtils::GO_HOME_MS) {
|
mappedInput.getHeldTime() >= ReaderUtils::GO_HOME_MS && KOREADER_STORE.hasCredentials()) {
|
||||||
if (KOREADER_STORE.hasCredentials()) {
|
|
||||||
const int currentPage = section ? section->currentPage : 0;
|
const int currentPage = section ? section->currentPage : 0;
|
||||||
const int totalPages = section ? section->pageCount : 0;
|
const int totalPages = section ? section->pageCount : 0;
|
||||||
startActivityForResult(
|
startActivityForResult(
|
||||||
@@ -155,7 +155,6 @@ void EpubReaderActivity::loop() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user