From: Niki Roo Date: Wed, 20 Mar 2019 22:53:37 +0000 (+0100) Subject: fix see word count on source/author, step 1 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=fb1ffdd032bb81bfa606a686f371038f2466c6af;p=fanfix-jexer.git fix see word count on source/author, step 1 --- diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java index 8d766f2..efacb1f 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java @@ -88,9 +88,8 @@ public class GuiReaderGroup extends JPanel { * @param seeWordcount * TRUE to see word counts, FALSE to see authors */ - public void refreshBooks(List stories, - boolean seeWordcount) { - this.infos = stories; + public void refreshBooks(List infos, boolean seeWordcount) { + this.infos = infos; this.words = seeWordcount; books = new ArrayList(); @@ -98,15 +97,15 @@ public class GuiReaderGroup extends JPanel { pane.invalidate(); pane.removeAll(); - if (stories != null) { - for (GuiReaderBookInfo info : stories) { + if (infos != null) { + for (GuiReaderBookInfo info : infos) { boolean isCached = false; if (info.getMeta() != null) { isCached = reader.isCached(info.getMeta().getLuid()); } GuiReaderBook book = new GuiReaderBook(reader, info, isCached, - seeWordcount); + words); if (backgroundColor != null) { book.setBackground(backgroundColor); } diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java index a0f0fc9..567c975 100644 --- a/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java +++ b/src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java @@ -574,7 +574,7 @@ class GuiReaderMainPanel extends JPanel { } } - bookPane.refreshBooks(infos, false); + bookPane.refreshBooks(infos, words); this.invalidate(); pane.invalidate();