From: David ‘Bombe’ Roden Date: Thu, 19 Apr 2012 15:47:45 +0000 (+0200) Subject: Load styles for track. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8b071d9a54a88e82a86d8948ea0ed3885576ad78;p=demoscenemusic.git Load styles for track. --- diff --git a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java index 482e717..405d71a 100644 --- a/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java +++ b/src/main/java/net/pterodactylus/demoscenemusic/data/DataManager.java @@ -218,6 +218,18 @@ public class DataManager { }); + private final Memoizer stylesMemoizer = new Memoizer(new Callable() { + + @Override + public Void call() throws Exception { + if (!hasValue("styles")) { + value("styles", Collection.class).set(getStylesByTrack(id())); + } + return null; + } + + }); + /** * @param id */ @@ -239,7 +251,7 @@ public class DataManager { */ @Override public Collection