X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSoneOptions.java;h=b5e42eede3020c749b8a7f20f5a917fe9d5092f8;hb=ab14aa498b45ecd2222b03d6c3607461a0ceb3f4;hp=819e94a1ae8ea6c2492c2a5ac73f411e2aac6f37;hpb=0e8f7804ce344bdd69f5ecc7febe25a60a53561d;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/SoneOptions.java b/src/main/java/net/pterodactylus/sone/data/SoneOptions.java index 819e94a..b5e42ee 100644 --- a/src/main/java/net/pterodactylus/sone/data/SoneOptions.java +++ b/src/main/java/net/pterodactylus/sone/data/SoneOptions.java @@ -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.LoadExternalContent.NEVER; /** * All Sone-specific options. @@ -26,8 +24,32 @@ public interface SoneOptions { boolean isShowNewReplyNotifications(); void setShowNewReplyNotifications(boolean showNewReplyNotifications); - ShowCustomAvatars getShowCustomAvatars(); - void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars); + LoadExternalContent getShowCustomAvatars(); + void setShowCustomAvatars(LoadExternalContent showCustomAvatars); + + /** + * Possible values for all options that are related to loading external content. + * + * @author David ‘Bombe’ Roden + */ + enum LoadExternalContent { + + /** 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. @@ -41,7 +63,7 @@ public interface SoneOptions { private boolean showNewSoneNotifications = true; private boolean showNewPostNotifications = true; private boolean showNewReplyNotifications = true; - private ShowCustomAvatars showCustomAvatars = NEVER; + private LoadExternalContent showCustomAvatars = NEVER; @Override public boolean isAutoFollow() { @@ -94,12 +116,12 @@ public interface SoneOptions { } @Override - public ShowCustomAvatars getShowCustomAvatars() { + public LoadExternalContent getShowCustomAvatars() { return showCustomAvatars; } @Override - public void setShowCustomAvatars(ShowCustomAvatars showCustomAvatars) { + public void setShowCustomAvatars(LoadExternalContent showCustomAvatars) { this.showCustomAvatars = showCustomAvatars; }