mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[reader] Fixed bug when a word is too big
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include "read_book_controller.h"
|
||||
#include <apps/apps_container.h>
|
||||
|
||||
namespace Reader
|
||||
namespace Reader
|
||||
{
|
||||
|
||||
ReadBookController::ReadBookController(Responder * parentResponder) :
|
||||
ViewController(parentResponder)
|
||||
ViewController(parentResponder),
|
||||
m_readerView(this)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -18,7 +20,7 @@ void ReadBookController::setBook(const External::Archive::File& file, bool isRic
|
||||
m_readerView.setText(reinterpret_cast<const char*>(file.data), file.dataLength, isRichTextFile);
|
||||
}
|
||||
|
||||
bool ReadBookController::handleEvent(Ion::Events::Event event) {
|
||||
bool ReadBookController::handleEvent(Ion::Events::Event event) {
|
||||
if(event == Ion::Events::Down) {
|
||||
m_readerView.nextPage();
|
||||
return true;
|
||||
@@ -34,6 +36,13 @@ void ReadBookController::viewDidDisappear() {
|
||||
savePosition();
|
||||
}
|
||||
|
||||
void ReadBookController::throwError() {
|
||||
static_cast<StackViewController *>(parentResponder())->pop();
|
||||
Container::activeApp()->displayWarning(I18n::Message::SyntaxError);
|
||||
// As the error is thrown when we are drawing, me must redraw the whole screen
|
||||
AppsContainer::sharedAppsContainer()->redrawWindow();
|
||||
}
|
||||
|
||||
void ReadBookController::savePosition() const {
|
||||
BookSave save = m_readerView.getBookSave();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user