From d90d5d1cf6accb7715843a5e49be737e45a929bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 19 Jul 2015 20:38:35 +0200 Subject: [PATCH] Revert "Store Sone earlier when creating new Sone" This reverts commit b64a9dcfdd584c6c6b7da45066b27bcc17cf6942. --- src/main/java/net/pterodactylus/sone/core/Core.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 95b4bfe..73bb95f 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -645,14 +645,13 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, sone.setLatestEdition(fromNullable(tryParse(property)).or(0L)); sone.setClient(new Client("Sone", SonePlugin.VERSION.toString())); sone.setKnown(true); - loadSone(sone); - sone.setStatus(SoneStatus.idle); - database.storeSone(sone); SoneInserter soneInserter = new SoneInserter(this, eventBus, freenetInterface, ownIdentity.getId()); eventBus.register(soneInserter); synchronized (soneInserters) { soneInserters.put(sone, soneInserter); } + loadSone(sone); + sone.setStatus(SoneStatus.idle); soneInserter.start(); return sone; } @@ -1086,6 +1085,7 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, for (Album album : topLevelAlbums) { sone.getRootAlbum().addAlbum(album); } + database.storeSone(sone); synchronized (soneInserters) { soneInserters.get(sone).setLastInsertFingerprint(lastInsertFingerprint); } -- 2.7.4