X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Freader%2Ftui%2FTuiReader.java;h=ef5e71bc676a237dd59dd2e53d7fad4affb527be;hb=d66deb8d8b30cff6b54db352eef34a3508939f84;hp=cc39dcde77e7173229c5cd597942e36721e6462b;hpb=70ee499b74323435ac7ac7dc8676d42c2e9048db;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/reader/tui/TuiReader.java b/src/be/nikiroo/fanfix/reader/tui/TuiReader.java index cc39dcd..ef5e71b 100644 --- a/src/be/nikiroo/fanfix/reader/tui/TuiReader.java +++ b/src/be/nikiroo/fanfix/reader/tui/TuiReader.java @@ -52,12 +52,19 @@ class TuiReader extends BasicReader { @Override public void read(boolean sync) throws IOException { + // TODO + if (!sync) { + // How could you do a not-sync in TUI mode? + throw new java.lang.IllegalStateException( + "Async mode not implemented yet."); + } + try { TuiReaderApplication app = new TuiReaderApplication(this, guessBackendType()); - new Thread(app).start(); + app.run(); } catch (Exception e) { - Instance.getTraceHandler().error(e); + Instance.getInstance().getTraceHandler().error(e); } } @@ -66,21 +73,35 @@ class TuiReader extends BasicReader { try { TuiReaderApplication app = new TuiReaderApplication(this, source, guessBackendType()); - new Thread(app).start(); + app.run(); } catch (Exception e) { - Instance.getTraceHandler().error(e); + Instance.getInstance().getTraceHandler().error(e); + } + } + + @Override + public void search(boolean sync) throws IOException { + // TODO + if (sync) { + throw new java.lang.IllegalStateException("Not implemented yet."); } } - + @Override - public void search(SupportType searchOn, String keywords, int page, int item) { - // TODO: !!! - throw new java.lang.IllegalStateException("Not implemented yet."); + public void search(SupportType searchOn, String keywords, int page, + int item, boolean sync) { + // TODO + if (sync) { + throw new java.lang.IllegalStateException("Not implemented yet."); + } } - + @Override - public void searchTag(SupportType searchOn, int page, int item, String... tags) { - // TODO: !!! - throw new java.lang.IllegalStateException("Not implemented yet."); + public void searchTag(SupportType searchOn, int page, int item, + boolean sync, Integer... tags) { + // TODO + if (sync) { + throw new java.lang.IllegalStateException("Not implemented yet."); + } } }