From: David ‘Bombe’ Roden Date: Sat, 12 Oct 2013 15:31:25 +0000 (+0200) Subject: Don’t store image explicitely after adding it to an album. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fbe915700b291b61821a79f42d1e4ca954e56175;p=Sone.git Don’t store image explicitely after adding it to an album. The album builder takes care of that. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 2628127..8756c60 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -1518,7 +1518,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider, checkArgument(sone.isLocal(), "sone must be a local Sone"); checkArgument(sone.equals(album.getSone()), "album must belong to the given Sone"); Image image = album.newImageBuilder().withId(temporaryImage.getId()).createdNow().sized(temporaryImage.getWidth(), temporaryImage.getHeight()).build(); - database.storeImage(image); imageInserter.insertImage(temporaryImage, image); return image; }