From 1093595cd24e791cab88b3d7bfa963b1bae0f5ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 11 Nov 2011 10:10:01 +0100 Subject: [PATCH] Add options for each notification type. --- src/main/java/net/pterodactylus/sone/core/Core.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index ee5ec87..aa5b820 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1008,6 +1008,9 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis } Sone sone = addLocalSone(ownIdentity); sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption(false)); + sone.getOptions().addBooleanOption("ShowNotification/NewSones", new DefaultOption(true)); + sone.getOptions().addBooleanOption("ShowNotification/NewPosts", new DefaultOption(true)); + sone.getOptions().addBooleanOption("ShowNotification/NewReplies", new DefaultOption(true)); sone.addFriend("nwa8lHa271k2QvJ8aa0Ov7IHAV-DFOCFgmDt3X6BpCI"); touchConfiguration(); return sone; @@ -1343,6 +1346,9 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis /* initialize options. */ sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption(false)); sone.getOptions().addBooleanOption("EnableSoneInsertNotifications", new DefaultOption(false)); + sone.getOptions().addBooleanOption("ShowNotification/NewSones", new DefaultOption(true)); + sone.getOptions().addBooleanOption("ShowNotification/NewPosts", new DefaultOption(true)); + sone.getOptions().addBooleanOption("ShowNotification/NewReplies", new DefaultOption(true)); /* load Sone. */ String sonePrefix = "Sone/" + sone.getId(); @@ -2131,6 +2137,9 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis /* save options. */ configuration.getBooleanValue(sonePrefix + "/Options/AutoFollow").setValue(sone.getOptions().getBooleanOption("AutoFollow").getReal()); + configuration.getBooleanValue(sonePrefix + "/Options/ShowNotification/NewSones").setValue(sone.getOptions().getBooleanOption("ShowNotification/NewSones").getReal()); + configuration.getBooleanValue(sonePrefix + "/Options/ShowNotification/NewPosts").setValue(sone.getOptions().getBooleanOption("ShowNotification/NewPosts").getReal()); + configuration.getBooleanValue(sonePrefix + "/Options/ShowNotification/NewReplies").setValue(sone.getOptions().getBooleanOption("ShowNotification/NewReplies").getReal()); configuration.getBooleanValue(sonePrefix + "/Options/EnableSoneInsertNotifications").setValue(sone.getOptions().getBooleanOption("EnableSoneInsertNotifications").getReal()); configuration.save(); -- 2.7.4