for (Post post : storedSone.getPosts()) {
posts.remove(post.getId());
if (!sone.getPosts().contains(post)) {
- markPostKnown(post);
+ coreListenerManager.firePostRemoved(post);
}
}
}
for (Reply reply : storedSone.getReplies()) {
replies.remove(reply.getId());
if (!sone.getReplies().contains(reply)) {
- markReplyKnown(reply);
+ coreListenerManager.fireReplyRemoved(reply);
}
}
}
* @param sone
* The Sone to save
*/
- public void saveSone(Sone sone) {
+ public synchronized void saveSone(Sone sone) {
if (!isLocalSone(sone)) {
logger.log(Level.FINE, "Tried to save non-local Sone: %s", sone);
return;
}
configuration.getStringValue(sonePrefix + "/Friends/" + friendCounter + "/ID").setValue(null);
+ configuration.save();
logger.log(Level.INFO, "Sone %s saved.", sone);
} catch (ConfigurationException ce1) {
logger.log(Level.WARNING, "Could not save Sone: " + sone, ce1);
/**
* Saves the current options.
*/
- public void saveConfiguration() {
+ public synchronized void saveConfiguration() {
/* store the options first. */
try {
configuration.getIntValue("Option/InsertionDelay").setValue(options.getIntegerOption("InsertionDelay").getReal());