Move enum to more appropriate class
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 13 Nov 2016 10:52:42 +0000 (11:52 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 13 Nov 2016 10:52:42 +0000 (11:52 +0100)
src/main/java/net/pterodactylus/sone/core/Core.java
src/main/java/net/pterodactylus/sone/data/Sone.java
src/main/java/net/pterodactylus/sone/data/SoneOptions.java
src/main/java/net/pterodactylus/sone/template/ProfileAccessor.java
src/main/java/net/pterodactylus/sone/web/OptionsPage.java

index 91825a6..42542c0 100644 (file)
@@ -68,8 +68,8 @@ import net.pterodactylus.sone.data.Profile;
 import net.pterodactylus.sone.data.Profile.Field;
 import net.pterodactylus.sone.data.Reply;
 import net.pterodactylus.sone.data.Sone;
-import net.pterodactylus.sone.data.Sone.ShowCustomAvatars;
 import net.pterodactylus.sone.data.Sone.SoneStatus;
+import net.pterodactylus.sone.data.SoneOptions.ShowCustomAvatars;
 import net.pterodactylus.sone.data.TemporaryImage;
 import net.pterodactylus.sone.database.AlbumBuilder;
 import net.pterodactylus.sone.database.Database;
index 68c8114..777660f 100644 (file)
@@ -69,30 +69,6 @@ public interface Sone extends Identified, Fingerprintable, Comparable<Sone> {
                downloading,
        }
 
-       /**
-        * The possible values for the “show custom avatars” option.
-        *
-        * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
-        */
-       public static enum ShowCustomAvatars {
-
-               /** Never show custom avatars. */
-               NEVER,
-
-               /** Only show custom avatars of followed Sones. */
-               FOLLOWED,
-
-               /** Only show custom avatars of Sones you manually trust. */
-               MANUALLY_TRUSTED,
-
-               /** Only show custom avatars of automatically trusted Sones. */
-               TRUSTED,
-
-               /** Always show custom avatars. */
-               ALWAYS,
-
-       }
-
        /** comparator that sorts Sones by their nice name. */
        public static final Comparator<Sone> NICE_NAME_COMPARATOR = new Comparator<Sone>() {
 
index 819e94a..4abf16f 100644 (file)
@@ -1,8 +1,6 @@
 package net.pterodactylus.sone.data;
 
-import static net.pterodactylus.sone.data.Sone.ShowCustomAvatars.NEVER;
-
-import net.pterodactylus.sone.data.Sone.ShowCustomAvatars;
+import static net.pterodactylus.sone.data.SoneOptions.ShowCustomAvatars.NEVER;
 
 /**
  * All Sone-specific options.
@@ -30,6 +28,30 @@ public interface SoneOptions {
        void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars);
 
        /**
+        * The possible values for the “show custom avatars” option.
+        *
+        * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
+        */
+       enum ShowCustomAvatars {
+
+               /** Never show custom avatars. */
+               NEVER,
+
+               /** Only show custom avatars of followed Sones. */
+               FOLLOWED,
+
+               /** Only show custom avatars of Sones you manually trust. */
+               MANUALLY_TRUSTED,
+
+               /** Only show custom avatars of automatically trusted Sones. */
+               TRUSTED,
+
+               /** Always show custom avatars. */
+               ALWAYS,
+
+       }
+
+       /**
         * {@link SoneOptions} implementation.
         *
         * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
index 980d960..7362179 100644 (file)
@@ -20,7 +20,7 @@ package net.pterodactylus.sone.template;
 import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.data.Profile;
 import net.pterodactylus.sone.data.Sone;
-import net.pterodactylus.sone.data.Sone.ShowCustomAvatars;
+import net.pterodactylus.sone.data.SoneOptions.ShowCustomAvatars;
 import net.pterodactylus.sone.freenet.wot.OwnIdentity;
 import net.pterodactylus.sone.freenet.wot.Trust;
 import net.pterodactylus.util.template.Accessor;
index 2bd1bfd..ae1dcc3 100644 (file)
@@ -24,7 +24,7 @@ import java.util.List;
 
 import net.pterodactylus.sone.core.Preferences;
 import net.pterodactylus.sone.data.Sone;
-import net.pterodactylus.sone.data.Sone.ShowCustomAvatars;
+import net.pterodactylus.sone.data.SoneOptions.ShowCustomAvatars;
 import net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired;
 import net.pterodactylus.sone.web.page.FreenetRequest;
 import net.pterodactylus.util.template.Template;