From: Niki Roo Date: Mon, 28 Aug 2017 04:30:03 +0000 (+0200) Subject: Gopher: menu/text fix for news step 2 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=6c13eccdd9953ff6d65f6fcad3a01fd2d57d68fd;p=gofetch.git Gopher: menu/text fix for news step 2 --- diff --git a/src/be/nikiroo/gofetch/Fetcher.java b/src/be/nikiroo/gofetch/Fetcher.java index 920b48a..9dbf0e1 100644 --- a/src/be/nikiroo/gofetch/Fetcher.java +++ b/src/be/nikiroo/gofetch/Fetcher.java @@ -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)) //