🔀 Merge branch 'release/v82'
[Sone.git] / src / main / java / net / pterodactylus / sone / template / SoneAccessor.java
index 5f4ab0c..b072dc9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneAccessor.java - Copyright Â© 2010–2016 David Roden
+ * Sone - SoneAccessor.java - Copyright Â© 2010–2020 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 package net.pterodactylus.sone.template;
 
-import static com.google.common.collect.FluentIterable.from;
-import static java.util.Arrays.asList;
 import static java.util.logging.Logger.getLogger;
-import static net.pterodactylus.sone.data.Album.FLATTENER;
-import static net.pterodactylus.sone.data.Album.IMAGES;
 
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -30,6 +26,7 @@ import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.data.Profile;
 import net.pterodactylus.sone.data.Sone;
 import net.pterodactylus.sone.data.Sone.SoneStatus;
+import net.pterodactylus.sone.data.SoneKt;
 import net.pterodactylus.sone.freenet.wot.OwnIdentity;
 import net.pterodactylus.sone.freenet.wot.Trust;
 import net.pterodactylus.sone.text.TimeTextConverter;
@@ -51,8 +48,6 @@ import net.pterodactylus.util.template.TemplateContext;
  * <dd>Will return {@code true} if the sone in question is the currently logged
  * in Sone.</dd>
  * </dl>
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David â€˜Bombe’ Roden</a>
  */
 public class SoneAccessor extends ReflectionAccessor {
 
@@ -118,7 +113,7 @@ public class SoneAccessor extends ReflectionAccessor {
                        }
                        return trust;
                } else if (member.equals("allImages")) {
-                       return from(asList(sone.getRootAlbum())).transformAndConcat(FLATTENER).transformAndConcat(IMAGES);
+                       return SoneKt.getAllImages(sone);
                } else if (member.equals("albums")) {
                        return sone.getRootAlbum().getAlbums();
                }