Gopher: menu/text fix for news step 2
authorNiki Roo <niki@nikiroo.be>
Mon, 28 Aug 2017 04:30:03 +0000 (06:30 +0200)
committerNiki Roo <niki@nikiroo.be>
Mon, 28 Aug 2017 04:30:03 +0000 (06:30 +0200)
src/be/nikiroo/gofetch/Fetcher.java

index 920b48af504db25f0f61e946c48ce27d931bea99..9dbf0e10bf60d52daad2081f9c615d27dc19973d 100644 (file)
@@ -93,7 +93,7 @@ public class Fetcher {
                        }
                        ref = "../" + ref + "/index.html";
 
-                       htmlBuilder.append(getLink(support.getDescription(), ref, false,
+                       htmlBuilder.append(getLink(support.getDescription(), ref, true,
                                        true));
                }
 
@@ -231,14 +231,14 @@ public class Fetcher {
         * 
         * @param name
         * @param ref
-        * @param index
-        *            this link is in an index (and link to a NON index)
+        * @param menu
+        *            menu (gophermap, i) mode
         * @param html
         * @return
         */
-       private String getLink(String name, String ref, boolean index, boolean html) {
+       private String getLink(String name, String ref, boolean menu, boolean html) {
                if (!html) {
-                       return new StringBuilder().append((index ? "0" : "1") + name)
+                       return new StringBuilder().append((menu ? "1" : "0") + name)
                                        .append("\t").append(ref) //
                                        .append("\t").append(hostname) //
                                        .append("\t").append(Integer.toString(port)) //