Add member “new” to Sone accessor.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 8 Nov 2010 19:42:37 +0000 (20:42 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 10 Nov 2010 19:50:11 +0000 (20:50 +0100)
src/main/java/net/pterodactylus/sone/template/SoneAccessor.java

index a21794d..edc0eec 100644 (file)
@@ -85,6 +85,8 @@ public class SoneAccessor extends ReflectionAccessor {
                        return core.getSoneStatus(sone) == SoneStatus.inserting;
                } else if (member.equals("downloading")) {
                        return core.getSoneStatus(sone) == SoneStatus.downloading;
+               } else if (member.equals("new")) {
+                       return core.isNewSone(sone);
                }
                return super.get(dataProvider, object, member);
        }