fix see word count on source/author, step 1
authorNiki Roo <niki@nikiroo.be>
Wed, 20 Mar 2019 22:53:37 +0000 (23:53 +0100)
committerNiki Roo <niki@nikiroo.be>
Wed, 20 Mar 2019 22:53:37 +0000 (23:53 +0100)
src/be/nikiroo/fanfix/reader/ui/GuiReaderGroup.java
src/be/nikiroo/fanfix/reader/ui/GuiReaderMainPanel.java

index 8d766f22c0a5366028753e5f92382d76ed11c3e4..efacb1f5f66c74a2282eba79e4b0debddcc98f72 100644 (file)
@@ -88,9 +88,8 @@ public class GuiReaderGroup extends JPanel {
         * @param seeWordcount
         *            TRUE to see word counts, FALSE to see authors
         */
-       public void refreshBooks(List<GuiReaderBookInfo> stories,
-                       boolean seeWordcount) {
-               this.infos = stories;
+       public void refreshBooks(List<GuiReaderBookInfo> infos, boolean seeWordcount) {
+               this.infos = infos;
                this.words = seeWordcount;
 
                books = new ArrayList<GuiReaderBook>();
@@ -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);
                                }
index a0f0fc9af6bef3cea2b62b113c339f08bd69d315..567c9758cfe0e914aec6c2ee1b8074dabd455989 100644 (file)
@@ -574,7 +574,7 @@ class GuiReaderMainPanel extends JPanel {
                        }
                }
 
-               bookPane.refreshBooks(infos, false);
+               bookPane.refreshBooks(infos, words);
 
                this.invalidate();
                pane.invalidate();