From dd96714b719597cc252f3f05ced1bc06e50001d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 12 Oct 2011 21:41:22 +0200 Subject: [PATCH] Save database later. --- src/main/java/net/pterodactylus/sone/core/Core.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 13dfead..a574a59 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -831,7 +831,6 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis sone.setLatestEdition(Numbers.safeParseLong(ownIdentity.getProperty("Sone.LatestEdition"), (long) 0)); sone.setClient(new Client("Sone", SonePlugin.VERSION.toString())); sone.setKnown(true); - database.saveSone(sone); /* TODO - load posts ’n stuff */ final SoneInserter soneInserter = new SoneInserter(this, freenetInterface, sone); soneInserter.addSoneInsertListener(this); @@ -839,6 +838,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis sone.setStatus(SoneStatus.idle); loadSone(sone); soneInserter.start(); + database.saveSone(sone); return sone; } @@ -899,7 +899,6 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis } } } - database.saveSone(sone); soneDownloader.addSone(sone); soneDownloaders.execute(new Runnable() { @@ -910,6 +909,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis } }); + database.saveSone(sone); return sone; } -- 2.7.4