From 8dd54015f6c18d3b53514a16d410730835e2d96d Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Thu, 23 Nov 2017 12:00:20 +0200 Subject: [PATCH] Fixed SessionsAsTable on Analysis page --- .../html/structure/SessionTabStructureCreator.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java b/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java index 8b295f641..fd6bf5512 100644 --- a/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java +++ b/Plan/src/main/java/com/djrapitops/plan/utilities/html/structure/SessionTabStructureCreator.java @@ -6,13 +6,16 @@ package main.java.com.djrapitops.plan.utilities.html.structure; import com.djrapitops.plugin.utilities.Verify; import main.java.com.djrapitops.plan.Plan; +import main.java.com.djrapitops.plan.Settings; import main.java.com.djrapitops.plan.data.Session; import main.java.com.djrapitops.plan.data.time.WorldTimes; import main.java.com.djrapitops.plan.utilities.FormatUtils; import main.java.com.djrapitops.plan.utilities.analysis.AnalysisUtils; +import main.java.com.djrapitops.plan.utilities.html.Html; import main.java.com.djrapitops.plan.utilities.html.HtmlStructure; import main.java.com.djrapitops.plan.utilities.html.graphs.WorldPieCreator; import main.java.com.djrapitops.plan.utilities.html.tables.KillsTableCreator; +import main.java.com.djrapitops.plan.utilities.html.tables.SessionsTableCreator; import java.util.HashMap; import java.util.List; @@ -30,10 +33,6 @@ public class SessionTabStructureCreator { Map uuidsByID = generateIDtoUUIDMap(sessions); -// if (Settings.DISPLAY_SESSIONS_AS_TABLE.isTrue()) { -// return new String[]{Html.TABLE_SESSIONS.parse("", "", "", SessionsTableCreator.createTable(uuidsByID, allSessions)[0]), ""}; -// } - if (Verify.isEmpty(allSessions)) { return new String[]{"
" + "

No Sessions

" + @@ -172,6 +171,10 @@ public class SessionTabStructureCreator { } public static String[] creteStructure(Map> sessions, List allSessions) { + if (Settings.DISPLAY_SESSIONS_AS_TABLE.isTrue()) { + return new String[]{Html.TABLE_SESSIONS.parse("", "", "", SessionsTableCreator.createTable(sessions, allSessions)[0]), ""}; + } + Map>> map = new HashMap<>(); for (Map.Entry> entry : sessions.entrySet()) {