From fb1ffdd032bb81bfa606a686f371038f2466c6af Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Wed, 20 Mar 2019 23:53:37 +0100 Subject: [PATCH] fix see word count on source/author, step 1 --- src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java | 11 +++++------ .../nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java b/src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java index 8d766f22..efacb1f5 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 a0f0fc9a..567c9758 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(); -- 2.27.0