aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/SubredditSettingData.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/SubredditSettingData.java b/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/SubredditSettingData.java
index 4759d102..d718ef08 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/SubredditSettingData.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/subreddit/SubredditSettingData.java
@@ -6,6 +6,10 @@ import com.google.gson.annotations.SerializedName;
import java.util.Objects;
public class SubredditSettingData {
+ public static final String WIKIMODE_ANYONE = "anyone";
+ public static final String WIKIMODE_DISABLED = "disabled";
+ public static final String WIKIMODE_MODONLY = "modonly";
+
// Content visibility || Posts to this profile can appear in r/all and your profile can be discovered in /users
@SerializedName("default_set")
private boolean defaultSet;
@@ -246,6 +250,10 @@ public class SubredditSettingData {
}
public String getWikiMode() {
+ if (wikiMode == null) {
+ // Default to disabled, since occasionally the API returns null.
+ return WIKIMODE_DISABLED;
+ }
return wikiMode;
}