From 8b071d9a54a88e82a86d8948ea0ed3885576ad78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 19 Apr 2012 17:47:45 +0200 Subject: [PATCH] Load styles for track. --- .../net/pterodactylus/demoscenemusic/data/DataManager.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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