- final List<SearchableTag> children = getChildrenForTag(tag);
- if (children != null) {
- GuiReaderSearchFrame.inUi(new Runnable() {
- @Override
- public void run() {
- addTagBar(children, tag);
+ waitable.setWaiting(true);
+ try {
+ final List<SearchableTag> children = getChildrenForTag(tag);
+ if (children != null) {
+ GuiReaderSearchFrame.inUi(new Runnable() {
+ @Override
+ public void run() {
+ addTagBar(children, tag);
+ }
+ });
+ }
+
+ if (tag != null && tag.isLeaf()) {
+ storyItem = 0;
+ try {
+ searchable.fillTag(tag);
+ page = 1;
+ stories = searchable.search(tag, 1);
+ maxPage = searchable.searchPages(tag);
+ currentTag = tag;
+ } catch (IOException e) {
+ GuiReaderSearchFrame.error(e);
+ page = 0;
+ maxPage = -1;
+ stories = new ArrayList<MetaData>();