From: David ‘Bombe’ Roden Date: Mon, 11 Jul 2011 04:12:40 +0000 (+0200) Subject: Add option to enable Sone insert notifications. X-Git-Tag: 0.6.6^2~25 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=030cf808626f4adba9976dbc8da3caee6fe60293;p=Sone.git Add option to enable Sone insert notifications. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 69332a6..c8d7588 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1222,6 +1222,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis /* initialize options. */ sone.getOptions().addBooleanOption("AutoFollow", new DefaultOption(false)); + sone.getOptions().addBooleanOption("EnableSoneInsertNotifications", new DefaultOption(false)); /* load Sone. */ String sonePrefix = "Sone/" + sone.getId(); @@ -1324,6 +1325,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis /* load options. */ sone.getOptions().getBooleanOption("AutoFollow").set(configuration.getBooleanValue(sonePrefix + "/Options/AutoFollow").getValue(null)); + sone.getOptions().getBooleanOption("EnableSoneInsertNotifications").set(configuration.getBooleanValue(sonePrefix + "/Options/EnableSoneInsertNotifications").getValue(null)); /* if we’re still here, Sone was loaded successfully. */ synchronized (sone) { @@ -1773,6 +1775,7 @@ 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/EnableSoneInsertNotifications").setValue(sone.getOptions().getBooleanOption("EnableSoneInsertNotifications").getReal()); configuration.save(); logger.log(Level.INFO, "Sone %s saved.", sone);