mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-06 16:37:58 +01:00
parent
388c87cbcd
commit
d30a34d0a3
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.djrapitops.plan.delivery.domain.mutators;
|
||||
|
||||
import com.djrapitops.plan.delivery.domain.DateHolder;
|
||||
import com.djrapitops.plan.delivery.domain.container.DataContainer;
|
||||
import com.djrapitops.plan.delivery.domain.keys.CommonKeys;
|
||||
import com.djrapitops.plan.delivery.domain.keys.SessionKeys;
|
||||
@ -56,7 +57,7 @@ public class SessionsMutator {
|
||||
return sessions;
|
||||
}
|
||||
|
||||
public SessionsMutator sort(Comparator<Session> sessionComparator) {
|
||||
public SessionsMutator sort(Comparator<DateHolder> sessionComparator) {
|
||||
sessions.sort(sessionComparator);
|
||||
return this;
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ public class PlayerJSONParser {
|
||||
.orElse(Collections.emptyList()));
|
||||
data.put("player_kills", new PlayerKillMutator(kills).filterNonSelfKills().toJSONAsMap(formatters));
|
||||
data.put("player_deaths", new PlayerKillMutator(deaths).toJSONAsMap(formatters));
|
||||
data.put("sessions", sessionsMutator.toServerNameJSONMaps(graphs, config.getWorldAliasSettings(), formatters));
|
||||
data.put("sessions", sessionsMutator.sort(new DateHolderRecentComparator()).toServerNameJSONMaps(graphs, config.getWorldAliasSettings(), formatters));
|
||||
data.put("sessions_per_page", config.get(DisplaySettings.SESSIONS_PER_PAGE));
|
||||
data.put("servers", serverAccordion);
|
||||
data.put("punchcard_series", graphs.special().punchCard(sessionsMutator).getDots());
|
||||
|
Loading…
Reference in New Issue
Block a user