git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code cleanup: Libraries/Readers
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
TuiReader.java
diff --git
a/src/be/nikiroo/fanfix/reader/TuiReader.java
b/src/be/nikiroo/fanfix/reader/TuiReader.java
index d18436f67a9497b4ec42e0a6514036e29447a9dd..e9f909da7674ffd41f580e6e59dc2ec88f27e5ad 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/TuiReader.java
+++ b/
src/be/nikiroo/fanfix/reader/TuiReader.java
@@
-1,32
+1,27
@@
package be.nikiroo.fanfix.reader;
import java.io.IOException;
package be.nikiroo.fanfix.reader;
import java.io.IOException;
-import java.util.List;
import be.nikiroo.fanfix.Instance;
import be.nikiroo.fanfix.Instance;
-import be.nikiroo.fanfix.data.MetaData;
class TuiReader extends BasicReader {
class TuiReader extends BasicReader {
- @Override
public void read() throws IOException {
if (getStory() == null) {
throw new IOException("No story to read");
}
public void read() throws IOException {
if (getStory() == null) {
throw new IOException("No story to read");
}
- open(getStory().getMeta().getLuid());
+ open(get
Library(), get
Story().getMeta().getLuid());
}
}
- @Override
public void read(int chapter) throws IOException {
// TODO: show a special page?
read();
}
public void read(int chapter) throws IOException {
// TODO: show a special page?
read();
}
- @Override
- public void start(String type) {
- List<MetaData> stories = Instance.getLibrary().getListByType(type);
+ public void browse(String source) {
try {
try {
- TuiReaderApplication app = new TuiReaderApplication(stories, this);
+ TuiReaderApplication app = new TuiReaderApplication(getLibrary()
+ .getListBySource(source), this);
new Thread(app).start();
} catch (Exception e) {
Instance.syserr(e);
new Thread(app).start();
} catch (Exception e) {
Instance.syserr(e);